本文整理了Java中javax.swing.JInternalFrame.addInternalFrameListener()
方法的一些代码示例,展示了JInternalFrame.addInternalFrameListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.addInternalFrameListener()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:addInternalFrameListener
暂无
代码示例来源:origin: geotools/geotools
final JInternalFrame frame = new JInternalFrame(title, true, true, true, true);
frame.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
frame.addInternalFrameListener(InternalWindowListener.wrap(listener));
((JDesktopPane) owner).add(frame);
frame.getContentPane().add(panel);
代码示例来源:origin: pentaho/mondrian
jf.addInternalFrameListener(
new InternalFrameAdapter() {
public void internalFrameClosing(InternalFrameEvent e) {
代码示例来源:origin: pentaho/mondrian
jf.addInternalFrameListener(
new InternalFrameAdapter() {
public void internalFrameClosing(InternalFrameEvent e) {
代码示例来源:origin: bcdev/beam
private void addRegisteredInternalFrameListeners(final JInternalFrame frame) {
for (InternalFrameListener l : internalFrameListeners) {
frame.addInternalFrameListener(l);
}
}
代码示例来源:origin: stackoverflow.com
final JInternalFrame f1, f2;
//...
f1.addInternalFrameListener(new InternalFrameAdapter() {
void internalFrameIconified(InternalFrameEvent e) {
// respond to iconfiy
}
});
f2.addInternalFrameListener(new InternalFrameAdapter() {
void internalFrameIconified(InternalFrameEvent e) {
// respond to iconify
}
});
代码示例来源:origin: pentaho/mondrian
schemaFrame.addInternalFrameListener(
new InternalFrameAdapter() {
public void internalFrameClosing(InternalFrameEvent e) {
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
public synchronized void add(Object key, JInternalFrame frame) {
map.put(key, frame);
frame.addInternalFrameListener(listener);
}
代码示例来源:origin: com.numdata/numdata-swing
/**
* Adds a window. The window is automatically removed when closed.
*
* @param window Window to add.
*/
public void addWindow( final JInternalFrame window )
{
window.addInternalFrameListener( _internalFrameListener );
_desktop.add( window );
}
代码示例来源:origin: bcdev/beam
/**
* Adds an internal frame listener to VISAT. Internal frame listeners are notified each time an internal frame
* within VISAT's desktop pane is activated, deactivated,opened or closed.
*
* @param listener the listener to be added
*/
public void addInternalFrameListener(final InternalFrameListener listener) {
internalFrameListeners.add(listener);
JInternalFrame[] internalFrames = getAllInternalFrames();
for (JInternalFrame internalFrame : internalFrames) {
internalFrame.addInternalFrameListener(listener);
}
}
代码示例来源:origin: de.sciss/scisslib
public static void add( AbstractWindow.Listener l, AbstractWindow w )
{
final InternalFrameListenerWrapper iflw = new InternalFrameListenerWrapper( l, w );
((JInternalFrame) w.getWindow()).addInternalFrameListener( iflw );
// if( mapListeners == null ) mapListeners = new HashMap();
// mapListeners.put( w, iflw );
}
代码示例来源:origin: org.xworker/xworker_core
public static void createInternalFrameListeners(ActionContext actionContext){
Thing self = (Thing) actionContext.get("self");
JInternalFrame parent = (JInternalFrame) actionContext.get("parent");
for(Thing child : self.getChilds()){
InternalFrameListener c = (InternalFrameListener) child.doAction("create", actionContext);
if(c != null){
parent.addInternalFrameListener(c);
}
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void run() {
_f.removeInternalFrameListener(l);
_f.addInternalFrameListener(l);
BuMainPanel mp = getMainPanel();
mp.addInternalFrame(_f);
menusOrganisationFenetres();
}
};
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void run() {
BuMainPanel mp = getMainPanel();
for (int i = _f.length - 1; i >= 0; i--) {
_f[i].removeInternalFrameListener(l);
_f[i].addInternalFrameListener(l);
mp.addInternalFrame(_f[i]);
}
menusOrganisationFenetres();
}
};
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
annotatorFrame.addInternalFrameListener(new OVTK2AnnotatorInternalFrameListener(annotator_new));
annotatorFrame.setContentPane(annotator_new);
annotatorFrame.setVisible(true);
annotatorFrame.addInternalFrameListener(new AnnotatorMenuAction());
if (!annotators.containsKey(viewer))
annotators.put(viewer, new ArrayList<JInternalFrame>());
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
filterFrame.addInternalFrameListener(new OVTK2FilterInternalFrameListener(filter_new));
filterFrame.setContentPane(filter_new);
filterFrame.setVisible(true);
filterFrame.addInternalFrameListener(new FilterMenuAction());
if (!filters.containsKey(viewer))
filters.put(viewer, new ArrayList<JInternalFrame>());
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public void registerEvents() {
super.registerEvents();
if (mHandlee != null) {
if (mHandlee instanceof Window) {
((Window) mHandlee).addWindowListener(this);
((Window) mHandlee).addWindowStateListener(this);
}
if (mHandlee instanceof JInternalFrame) {
((JInternalFrame) mHandlee).addInternalFrameListener(this);
((JInternalFrame) mHandlee).addPropertyChangeListener(this);
}
}
}
代码示例来源:origin: org.japura/japura-gui
private void restoreRootPane() {
rootPane.getRootPane().removeComponentListener(resizeListener);
rootPane.getLayeredPane().remove(getModalPanel());
if (rootPane instanceof JFrame) {
JFrame frame = (JFrame) rootPane;
frame.setDefaultCloseOperation(oldDefaultCloseOperation);
for (WindowListener listener : oldWindowListeners) {
frame.addWindowListener(listener);
}
} else if (rootPane instanceof JDialog) {
JDialog dialog = (JDialog) rootPane;
dialog.setDefaultCloseOperation(oldDefaultCloseOperation);
for (WindowListener listener : oldWindowListeners) {
dialog.addWindowListener(listener);
}
} else if (rootPane instanceof JInternalFrame) {
JInternalFrame frame = (JInternalFrame) rootPane;
frame.setDefaultCloseOperation(oldDefaultCloseOperation);
for (InternalFrameListener listener : oldInternalFrameListeners) {
frame.addInternalFrameListener(listener);
}
}
Component comp = (Component) rootPane;
comp.update(comp.getGraphics());
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
private JInternalFrame createJInternalFrame(String name, Class c, Component view) {
JInternalFrame frame = new JInternalFrame(name, true, true, true, true);
frame.setResizable(true);
try {
// Get an icon for the object
Icon icon;
icon = Utility.getIcon(c);
frame.setFrameIcon(icon);
} catch (Exception e) {
}
// Put the GUI and icon in the frame
frame.getContentPane().add(view);
// Listen to the frame, so we notice if it closes
frame.addInternalFrameListener(listener);
BoxPanelSwitchableView bsv = Utility.getBoxPanelTabPane();
bsv.addComponent(name, frame, DisplayType.FRAME);
return frame;
}
代码示例来源:origin: bcdev/beam
@Override
protected JComponent createControl() {
JComponent pageComponentControl = getPageComponent().getControl();
if (pageComponentControl.getName() == null) {
nameComponent(pageComponentControl, "Control");
}
internalFrame = new JInternalFrame();
configureControl();
internalFrame.getContentPane().add(pageComponentControl, BorderLayout.CENTER);
internalFrame.addInternalFrameListener(new InternalFrameHandler());
nameComponent(internalFrame, "Pane");
return internalFrame;
}
代码示例来源:origin: bcdev/beam
public void addFrame(final JInternalFrame internalFrame) {
if (!internalFrame.isVisible()) {
internalFrame.setVisible(true);
}
internalFrame.addInternalFrameListener(frameListener);
desktopPane.add(internalFrame);
addTabFor(internalFrame);
if (internalFrame.isSelected()) {
selectTabFor(internalFrame);
} else {
try {
internalFrame.setSelected(true);
} catch (PropertyVetoException ignored) {
}
}
internalFrame.addPropertyChangeListener(JInternalFrame.TITLE_PROPERTY, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
final InternalFrameProxy placeHolder = getPlaceHolderFor(internalFrame);
final int index = tabbedPane.indexOfComponent(placeHolder);
if (index > -1) {
tabbedPane.setTitleAt(index, internalFrame.getTitle());
}
}
});
}
内容来源于网络,如有侵权,请联系作者删除!