本文整理汇总了Java中javax.swing.event.InternalFrameEvent类的典型用法代码示例。如果您正苦于以下问题:Java InternalFrameEvent类的具体用法?Java InternalFrameEvent怎么用?Java InternalFrameEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InternalFrameEvent类属于javax.swing.event包,在下文中一共展示了InternalFrameEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JMFrame
import javax.swing.event.InternalFrameEvent; //导入依赖的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: ChildFrameMDI
import javax.swing.event.InternalFrameEvent; //导入依赖的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);
}
}
示例3: initialize
import javax.swing.event.InternalFrameEvent; //导入依赖的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$
}
示例4: novo
import javax.swing.event.InternalFrameEvent; //导入依赖的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() );
}
} );
}
}
}
示例5: novoLanca
import javax.swing.event.InternalFrameEvent; //导入依赖的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();
}
} );
}
}
示例6: abreRma
import javax.swing.event.InternalFrameEvent; //导入依赖的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();
}
} );
}
}
示例7: createFrame
import javax.swing.event.InternalFrameEvent; //导入依赖的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;
}
示例8: QueryBuilderInternalFrame
import javax.swing.event.InternalFrameEvent; //导入依赖的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);
}
示例9: initialize
import javax.swing.event.InternalFrameEvent; //导入依赖的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();
}
示例10: initialize
import javax.swing.event.InternalFrameEvent; //导入依赖的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();
}
示例11: setIcon
import javax.swing.event.InternalFrameEvent; //导入依赖的package包/类
/**
* Iconifies or de-iconifies this internal frame,
* if the look and feel supports iconification.
* If the internal frame's state changes to iconified,
* this method fires an <code>INTERNAL_FRAME_ICONIFIED</code> event.
* If the state changes to de-iconified,
* an <code>INTERNAL_FRAME_DEICONIFIED</code> event is fired.
*
* @param b a boolean, where <code>true</code> means to iconify this internal frame and
* <code>false</code> means to de-iconify it
* @exception PropertyVetoException when the attempt to set the
* property is vetoed by the <code>JInternalFrame</code>
*
* @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED
* @see InternalFrameEvent#INTERNAL_FRAME_DEICONIFIED
*
* @beaninfo
* bound: true
* constrained: true
* description: The image displayed when this internal frame is minimized.
*/
public void setIcon(boolean b) throws PropertyVetoException {
if (isIcon == b) {
return;
}
/* If an internal frame is being iconified before it has a
parent, (e.g., client wants it to start iconic), create the
parent if possible so that we can place the icon in its
proper place on the desktop. I am not sure the call to
validate() is necessary, since we are not going to display
this frame yet */
firePropertyChange("ancestor", null, getParent());
Boolean oldValue = isIcon ? Boolean.TRUE : Boolean.FALSE;
Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
fireVetoableChange(IS_ICON_PROPERTY, oldValue, newValue);
isIcon = b;
firePropertyChange(IS_ICON_PROPERTY, oldValue, newValue);
if (b)
fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ICONIFIED);
else
fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED);
}
示例12: setIcon
import javax.swing.event.InternalFrameEvent; //导入依赖的package包/类
/**
* Iconifies or de-iconifies this internal frame,
* if the look and feel supports iconification.
* If the internal frame's state changes to iconified,
* this method fires an <code>INTERNAL_FRAME_ICONIFIED</code> event.
* If the state changes to de-iconified,
* an <code>INTERNAL_FRAME_DEICONIFIED</code> event is fired.
*
* @param b a boolean, where <code>true</code> means to iconify this internal frame and
* <code>false</code> means to de-iconify it
* @exception PropertyVetoException when the attempt to set the
* property is vetoed by the <code>JInternalFrame</code>
*
* @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED
* @see InternalFrameEvent#INTERNAL_FRAME_DEICONIFIED
*/
@BeanProperty(description
= "The image displayed when this internal frame is minimized.")
public void setIcon(boolean b) throws PropertyVetoException {
if (isIcon == b) {
return;
}
/* If an internal frame is being iconified before it has a
parent, (e.g., client wants it to start iconic), create the
parent if possible so that we can place the icon in its
proper place on the desktop. I am not sure the call to
validate() is necessary, since we are not going to display
this frame yet */
firePropertyChange("ancestor", null, getParent());
Boolean oldValue = isIcon ? Boolean.TRUE : Boolean.FALSE;
Boolean newValue = b ? Boolean.TRUE : Boolean.FALSE;
fireVetoableChange(IS_ICON_PROPERTY, oldValue, newValue);
isIcon = b;
firePropertyChange(IS_ICON_PROPERTY, oldValue, newValue);
if (b)
fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ICONIFIED);
else
fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED);
}
示例13: FrequenciesByYearInternalFrame
import javax.swing.event.InternalFrameEvent; //导入依赖的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();
}
});
}
示例14: initialize
import javax.swing.event.InternalFrameEvent; //导入依赖的package包/类
private void initialize() {
this.setSize(new java.awt.Dimension(780,550));
this.setContentPane(getJContentPane());
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
this.addInternalFrameListener(new InternalFrameAdapter(){
public void internalFrameClosing(InternalFrameEvent e){
handleClose();
}
});
Dimension screen = getToolkit().getScreenSize();
this.setLocation((screen.width - getSize().width) / 2,
(screen.height - getSize().height) / 2);
}
示例15: setPrimeiroFoco
import javax.swing.event.InternalFrameEvent; //导入依赖的package包/类
public void setPrimeiroFoco(final JComponent comp) {
addInternalFrameListener(new InternalFrameAdapter() {
public void internalFrameActivated(InternalFrameEvent ievt) {
comp.requestFocusInWindow();
}
});
}