本文整理汇总了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();
}
} );
}
示例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$
}
示例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() );
}
} );
}
}
}
示例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();
}
} );
}
}
示例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();
}
} );
}
}
示例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;
}
示例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);
}
}
示例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();
}
}
示例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);
}
}
示例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();
}
});
}
示例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);
}
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
});
}