当前位置: 首页>>代码示例>>Java>>正文


Java InternalFrameAdapter类代码示例

本文整理汇总了Java中javax.swing.event.InternalFrameAdapter的典型用法代码示例。如果您正苦于以下问题:Java InternalFrameAdapter类的具体用法?Java InternalFrameAdapter怎么用?Java InternalFrameAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InternalFrameAdapter类属于javax.swing.event包,在下文中一共展示了InternalFrameAdapter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JMFrame

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
public JMFrame(Player player, String title) {
super(title, true, true, true, true);
getContentPane().setLayout( new BorderLayout() );
setSize(320, 10);
setLocation(50, 50);
setVisible(true);
mplayer = player;
mplayer.addControllerListener((ControllerListener) this);
mplayer.realize();
addInternalFrameListener( new InternalFrameAdapter() {
    public void internalFrameClosing(InternalFrameEvent ife) {
	mplayer.close();
    }
} );
	    
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:17,代码来源:MDIApp.java

示例2: initialize

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
private void initialize() {
	this.setSize(new Dimension(780, 530));
	//this.setPreferredSize(new Dimension(780, 550));
	this.setName("mframe"); //$NON-NLS-1$
	this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    this.addInternalFrameListener(new InternalFrameAdapter(){
      public void internalFrameClosing(InternalFrameEvent e){
        handleClose();
      }
    });   
	this.setContentPane(getJContentPane());
	Dimension screen = getToolkit().getScreenSize();
    this.setLocation((screen.width - getSize().width) / 2,
	        (screen.height - getSize().height) / 2);
    this.pack();
    panelStack = new Stack<String>();
    showPanel("blankPanel"); //$NON-NLS-1$
}
 
开发者ID:unsftn,项目名称:bisis-v4,代码行数:19,代码来源:MainFrame.java

示例3: novo

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
private void novo() {

			if ( validaPeriodo() ) {
				Container cont = getContentPane();
				while ( true ) {
					if ( cont instanceof FPrincipal )
						break;
					cont = cont.getParent();
				}
				if ( ! ( (FPrincipal) cont ).temTela( "FSubLanca" ) ) {
					FSubLanca form = new FSubLanca( null, sCodPlan, dIniLanca, dFimLanca );
					( (FPrincipal) cont ).criatela( "FSubLanca", form, con );
					form.addInternalFrameListener( new InternalFrameAdapter() {

						public void internalFrameClosed( InternalFrameEvent ievt ) {

							adicLanca( ( (FSubLanca) ievt.getSource() ).getValores() );
						}
					} );
				}
			}
		}
 
开发者ID:cams7,项目名称:erp,代码行数:23,代码来源:FLanca.java

示例4: novoLanca

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
private void novoLanca() {

		String planejamento = getPlanejamentoVendedor();
		if ( planejamento == null ) {
			Funcoes.mensagemInforma( this, "Não foi encontrado planejamento do vendedor." );
			return;
		}

		if ( !Aplicativo.telaPrincipal.temTela( FSubLanca.class.getName() ) ) {
			FSubLanca form = new FSubLanca( null, planejamento, txtDataIniRedeber.getVlrDate(), txtDataFimReceber.getVlrDate() );
			Aplicativo.telaPrincipal.criatela( "FSubLanca", form, con );

			form.addInternalFrameListener( new InternalFrameAdapter() {

				public void internalFrameClosed( InternalFrameEvent ievt ) {

					carregaFechamento();
				}
			} );
		}
	}
 
开发者ID:cams7,项目名称:erp,代码行数:22,代码来源:FVendaConsig.java

示例5: abreRma

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
private void abreRma() {
	
	Container cont = getContentPane();
	while ( true ) {
		if ( cont instanceof FPrincipal )
			break;
		cont = cont.getParent();
	}
	int iRma = ( (Integer) tabRMA.getValor( tabRMA.getLinhaSel(), 1 ) ).intValue();
	if ( !((FPrincipal) cont ).temTela( "Requisição de material" ) ) {
		FRma tela = new FRma();
		fPrim.criatela( "Requisição de material", tela, con );
		tela.exec( iRma );
		tela.addInternalFrameListener( new InternalFrameAdapter() {
			public void internalFrameClosed( InternalFrameEvent ievt ) {
				lcCampos.carregaDados();
				desabilitaBtFinaliza();
			}
		} );
	}
}
 
开发者ID:cams7,项目名称:erp,代码行数:22,代码来源:FOP.java

示例6: createFrame

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/** Create a new internal frame */
private JInternalFrame createFrame(final AbstractForm form) {
	final JInternalFrame frame = new JInternalFrame();
	frame.setTitle(form.getTitle());
	frame.setClosable(true);
	frame.setIconifiable(true);
	frame.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
	frame.addInternalFrameListener(new InternalFrameAdapter() {
		public void internalFrameClosed(InternalFrameEvent e) {
			smartDesktopRequestFocus();	// see note
			form.dispose();
		}
	});
	frame.setContentPane(form);
	return frame;
}
 
开发者ID:CA-IRIS,项目名称:ca-iris,代码行数:17,代码来源:SmartDesktop.java

示例7: ChildFrameMDI

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/**
 * constructs a new internal frame that knows about its parent.
 * 
 * @param parent the parent frame
 * @param title the title of the frame
 */
public ChildFrameMDI(Main parent, String title) {
  super(title, true, true, true, true);

  m_Parent = parent;

  addInternalFrameListener(new InternalFrameAdapter() {
    @Override
    public void internalFrameActivated(InternalFrameEvent e) {
      // update title of parent
      if (getParentFrame() != null) {
        getParentFrame().createTitle(getTitle());
      }
    }
  });

  // add to parent
  if (getParentFrame() != null) {
    getParentFrame().addChildFrame(this);
    getParentFrame().jDesktopPane.add(this);
  }
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:28,代码来源:Main.java

示例8: addGame

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
private void addGame(String title,GameData gameData) {
	if (editor!=null) {
		closeGame();
	}
	
	editor = new RealmGameEditor(this,title,gameData);
	editor.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
	editor.addInternalFrameListener(new InternalFrameAdapter() {
		public void internalFrameClosing(InternalFrameEvent e) {
			closeGame();
		}
	});
	desktop.add(editor);
	editor.setVisible(true);
	try {
		editor.setSelected(true);
		editor.setMaximum(true);
	}
	catch(PropertyVetoException ex) {
		ex.printStackTrace();
	}
}
 
开发者ID:dewkid,项目名称:RealmSpeak,代码行数:23,代码来源:RealmGmFrame.java

示例9: ChildFrameMDI

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/**
    * constructs a new internal frame that knows about its parent.
    * 
    * @param parent	the parent frame
    * @param title	the title of the frame
    */
   public ChildFrameMDI(Main parent, String title) {
     super(title, true, true, true, true);
     
     m_Parent = parent;

     addInternalFrameListener(new InternalFrameAdapter() {
public void internalFrameActivated(InternalFrameEvent e) {
  // update title of parent
  if (getParentFrame() != null)
    getParentFrame().createTitle(getTitle());
}
     });
     
     // add to parent
     if (getParentFrame() != null) {
getParentFrame().addChildFrame(this);
getParentFrame().jDesktopPane.add(this);
     }
   }
 
开发者ID:dsibournemouth,项目名称:autoweka,代码行数:26,代码来源:Main.java

示例10: InnerWindowImpl

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/**
 * Creates new form InnerWindow
 */
public InnerWindowImpl() {
    initComponents();
    this.setVisible(true);
    this.setMaximizable(true);
    this.setResizable(true);
    this.setClosable(true);
    this.setFocusable(true);
    this.setTitle("New File");
    TextLineNumber tln = new TextLineNumber(textPane);
    scrollPane.setRowHeaderView(tln);
    this.addInternalFrameListener(new InternalFrameAdapter(){
        @Override
        public void internalFrameActivated(InternalFrameEvent e){
            textPane.requestFocusInWindow();
        }
    });
}
 
开发者ID:Amine-H,项目名称:new-Line,代码行数:21,代码来源:InnerWindowImpl.java

示例11: testPostClosingEvent

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
public void testPostClosingEvent() {
    class MyInternalFrameAdapter extends InternalFrameAdapter {
        boolean ok = false;

        @Override
        public void internalFrameClosing(final InternalFrameEvent e) {
            ok = true;
        }
    }
    MyInternalFrameAdapter listener = new MyInternalFrameAdapter();
    frame.addInternalFrameListener(listener);
    pane.postClosingEvent(frame);
    if (isHarmony()) {
        assertTrue("event ok", listener.ok);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:17,代码来源:BasicInternalFrameTitlePaneTest.java

示例12: QueryBuilderInternalFrame

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
public QueryBuilderInternalFrame(QueryBuilderTableModel queryBuilderTableModel,
                                 QueryBuilder queryBuilder)
{
    _dragObject = null;
    // Set some private variables
    _queryBuilderTableModel = queryBuilderTableModel;
    _queryBuilder = queryBuilder;

    // Create the node that will be used for the property sheet
    _node = new TableNode(queryBuilderTableModel.getFullTableName(),
                          queryBuilderTableModel.getCorrName(),
                          _queryBuilder);
    setResizable(true);
    setFrameIcon(null);
    setIconifiable(false);

    // Add an anonymous listener for the internalFrameOpened event
    addInternalFrameListener(new InternalFrameAdapter() {
        public void internalFrameOpened(InternalFrameEvent e) {
            // As soon as a frame is opened select it.
            // This doesn't seem to work.
            try {
                QueryBuilderInternalFrame.this.setSelected(true);
            } catch(PropertyVetoException pve) {
            }
        }});

    this.setBackground(Color.white);

}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:QueryBuilderInternalFrame.java

示例13: initialize

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/**
	 * Initialize.
	 */
	private void initialize() {
		
		this.setClosable(true);
		this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
		this.setVisible(true);
		this.registerEscapeKeyStroke();
		this.addInternalFrameListener(new InternalFrameAdapter() {
			/* (non-Javadoc)
			 * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent)
			 */
			@Override
			public void internalFrameClosing(InternalFrameEvent ife) {
				projectWindow.tabRestore();
				super.internalFrameClosing(ife);
			}
			/* (non-Javadoc)
			 * @see javax.swing.event.InternalFrameAdapter#internalFrameDeactivated(javax.swing.event.InternalFrameEvent)
			 */
			@Override
			public void internalFrameDeactivated(InternalFrameEvent e) {
//				projectWindow.tabRestore();
				super.internalFrameDeactivated(e);
			}
			
		});
		((BasicInternalFrameUI) this.getUI()).setNorthPane(null);
	
		// --- Add ComponentListener to MainWindow -------- 
		this.addComponentListenerOfMainWindow();
		
	}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:35,代码来源:MaximizedTab.java

示例14: initialize

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/**
 * This method initializes this
 * @return void
 */
private void initialize() {
	
	this.setAutoscrolls(true);
	this.setMaximizable(true);
	this.setResizable(true);
	this.setIconifiable(true);

	this.setClosable(true);
	this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
	
	this.setTitle("Component");
	
	// --- Remove Frame menu ----------------
	BasicInternalFrameUI ui = (BasicInternalFrameUI)this.getUI();
	ui.getNorthPane().remove(0);
	
	this.addInternalFrameListener(new InternalFrameAdapter() {
		@Override
		public void internalFrameClosing(InternalFrameEvent ife) {
			doClose();
		}
	});
	
	this.configureForGraphObject();
	this.setContentPane(this.getJContentPane());
	this.setSize(this.defaultWidth, this.defaultHeight);
	this.setInitialSizeAndPosition();
	
	// --- Call to the super-class ----------
	this.registerAtDesktopAndSetVisible();
	
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:37,代码来源:BasicGraphGuiProperties.java

示例15: FrequenciesByYearInternalFrame

import javax.swing.event.InternalFrameAdapter; //导入依赖的package包/类
/**
 * Creates new form FrequenciesByYearInternalFrame
 *
 * @param dtp
 */
public FrequenciesByYearInternalFrame(JDesktopPane dtp) {
    this.dtp = dtp;
    dictionary = CanRegClientApp.getApplication().getDictionary();
    initComponents();
    initOtherComponents();

    localSettings = CanRegClientApp.getApplication().getLocalSettings();
    addInternalFrameListener(new InternalFrameAdapter() {
        @Override
        public void internalFrameClosing(InternalFrameEvent e) {
            close();
        }
    });
}
 
开发者ID:IARC-CSU,项目名称:CanReg5,代码行数:20,代码来源:FrequenciesByYearInternalFrame.java


注:本文中的javax.swing.event.InternalFrameAdapter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。