本文整理了Java中javax.swing.JInternalFrame.getRootPane()
方法的一些代码示例,展示了JInternalFrame.getRootPane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.getRootPane()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:getRootPane
暂无
代码示例来源:origin: chewiebug/GCViewer
@Override
public void internalFrameClosing(InternalFrameEvent e) {
JInternalFrame internalFrame = e.getInternalFrame();
internalFrame.removeInternalFrameListener(this);
internalFrame.getRootPane().remove(internalFrame);
if (internalFrame.getRootPane().getComponentCount() == 0) {
getActionMap(e).get(ActionCommands.ARRANGE.toString()).setEnabled(false);
}
// remove menuitem from menu and from button group
JMenu windowMenu = getMenuBar(e).getWindowMenu();
for (int i = 2; i < windowMenu.getItemCount(); i++) {
JMenuItem item = windowMenu.getItem(i);
if (((WindowMenuItemAction) item.getAction()).getInternalFrame() == internalFrame) {
getMenuBar(e).removeFromWindowMenuGroup(item);
break;
}
}
// if this internalFrame is the last to be open, update the menu state
// -> otherwise any settings done by the user are lost
if (getGCViewerGui(e).getDesktopPane().getComponentCount() == 1) {
updateMenuItemState(e);
// set same menustate, when the last is closed as is set for deactivated
internalFrameDeactivated(e);
}
// if some thread is still loading, it should stop now
getSelectedGCDocument(e).getGCResources().stream().forEach(gcResource -> gcResource.setIsReadCancelled(true));
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Retrieves the <code>modified</code> state for the specified internal
* frame.
*
* @param internalFrame
* The internal frame.
* @return <code>true</code> if the specified internal frame is marked as
* modified, <code>false</code> otherwise.
* @see SubstanceLookAndFeel#WINDOW_MODIFIED
*/
public static boolean isInternalFrameModified(JInternalFrame internalFrame) {
return Boolean.TRUE.equals(internalFrame.getRootPane()
.getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED));
}
代码示例来源:origin: antlr/antlrworks
public JRootPane getRootPane() {
if(useDesktop) {
return jInternalFrame.getRootPane();
} else {
return jFrame.getRootPane();
}
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Retrieves the <code>modified</code> state for the specified internal
* frame.
*
* @param internalFrame
* The internal frame.
* @return <code>true</code> if the specified internal frame is marked as
* modified, <code>false</code> otherwise.
* @see SubstanceLookAndFeel#WINDOW_MODIFIED
*/
public static boolean isInternalFrameModified(JInternalFrame internalFrame) {
return Boolean.TRUE.equals(internalFrame.getRootPane()
.getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED));
}
代码示例来源:origin: com.github.insubstantial/substance
public DecorationAreaType getThisDecorationType() {
DecorationAreaType dat = SubstanceLookAndFeel.getDecorationType(this);
if (dat == DecorationAreaType.PRIMARY_TITLE_PANE) {
return SubstanceCoreUtilities.isPaintRootPaneActivated(frame.getRootPane())
? DecorationAreaType.PRIMARY_TITLE_PANE
: DecorationAreaType.PRIMARY_TITLE_PANE_INACTIVE;
} else if (dat == DecorationAreaType.SECONDARY_TITLE_PANE) {
return SubstanceCoreUtilities.isPaintRootPaneActivated(frame.getRootPane())
? DecorationAreaType.SECONDARY_TITLE_PANE
: DecorationAreaType.SECONDARY_TITLE_PANE_INACTIVE;
} else {
return dat;
}
}
代码示例来源:origin: stackoverflow.com
JInternalFrame frame = new JInternalFrame("frame", false, false, false, false);
frame.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
frame.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void contextHelp(JComponent _c) {
JComponent comp = _c;
if (comp instanceof JInternalFrame) comp = ((JInternalFrame) comp).getRootPane();
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void uninstallListeners() {
this.frame.removePropertyChangeListener(this.substancePropertyListener);
this.substancePropertyListener = null;
this.frame.getRootPane().removePropertyChangeListener(
this.substanceWinModifiedListener);
this.substanceWinModifiedListener = null;
super.uninstallListeners();
}
代码示例来源:origin: org.java.net.substance/substance
@Override
public void uninstallListeners() {
this.frame.removePropertyChangeListener(this.substancePropertyListener);
this.substancePropertyListener = null;
this.frame.getRootPane().removePropertyChangeListener(
this.substanceWinModifiedListener);
this.substanceWinModifiedListener = null;
super.uninstallListeners();
}
代码示例来源:origin: org.cytoscape/swing-application-impl
private void disposeFrame(final JInternalFrame frame) throws PropertyVetoException {
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
try {
disposeFrame(frame);
} catch (PropertyVetoException e) {
logger.error("Network View unable to be killed", e);
}
}
});
return;
}
frame.getRootPane().getLayeredPane().removeAll();
frame.getRootPane().getContentPane().removeAll();
frame.setClosed(true);
frame.removeInternalFrameListener(this);
InternalFrameListener frameListener = frameListeners.remove(frame);
if (frameListener != null)
frame.removeInternalFrameListener(frameListener);
frame.dispose();
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
cp=((JInternalFrame)cp).getRootPane();
代码示例来源:origin: org.java.net.substance/substance
@Override
protected void installListeners() {
super.installListeners();
this.substancePropertyListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (JInternalFrame.TITLE_PROPERTY.equals(evt.getPropertyName())) {
SubstanceInternalFrameTitlePane.this
.setToolTipText((String) evt.getNewValue());
}
if ("JInternalFrame.messageType".equals(evt.getPropertyName())) {
updateOptionPaneState();
frame.repaint();
}
}
};
this.frame.addPropertyChangeListener(this.substancePropertyListener);
// Property change listener for pulsating close button
// when window has been marked as changed.
this.substanceWinModifiedListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (SubstanceLookAndFeel.WINDOW_MODIFIED.equals(evt
.getPropertyName())) {
syncCloseButtonTooltip();
}
}
};
// Wire it on the root pane.
this.frame.getRootPane().addPropertyChangeListener(
this.substanceWinModifiedListener);
}
代码示例来源:origin: com.github.insubstantial/substance
this.frame.getRootPane().addPropertyChangeListener(
this.substanceWinModifiedListener);
代码示例来源:origin: net.sf.tinylaf/tinylaf
palette.getRootPane().setDefaultButton(def);
palette.getContentPane().add(def);
代码示例来源:origin: com.github.insubstantial/substance
rootPane = ((JInternalFrame) frame).getRootPane();
rootPane = ((JInternalFrame) frame).getRootPane();
代码示例来源:origin: org.java.net.substance/substance
rootPane = ((JInternalFrame) frame).getRootPane();
rootPane = ((JInternalFrame) frame).getRootPane();
代码示例来源:origin: net.java.linoleum/application
dialog.getRootPane().setWindowDecorationStyle(JRootPane.FILE_CHOOSER_DIALOG);
dialog.getRootPane().setDefaultButton(ui.getDefaultButton(this));
代码示例来源:origin: Geomatys/geotoolkit
/**
* List windows known to this desktop.
*/
private void listWindows() {
final Component[] components = getComponents();
final String[] titles = new String[components.length];
for (int i=0; i<components.length; i++) {
Component c = components[i];
String title = String.valueOf(c.getName());
if (c instanceof JInternalFrame) {
final JInternalFrame ci = (JInternalFrame) c;
title = String.valueOf(ci.getTitle());
c = ci.getRootPane().getComponent(0);
}
final Dimension size = c.getSize();
titles[i] = title + " : " + c.getClass().getSimpleName() +
'[' + size.width + " \u00D7 " + size.height + ']';
}
final JInternalFrame frame = new JInternalFrame("Windows", true, true, true, true);
frame.add(new JScrollPane(new JList<>(titles)));
frame.pack();
frame.setVisible(true);
add(frame);
}
代码示例来源:origin: com.jtattoo/JTattoo
th = frame.getSize().height - frame.getRootPane().getSize().height - fh - 1;
if (frame.getJMenuBar() != null) {
th -= frame.getJMenuBar().getSize().height;
代码示例来源:origin: org.jclarion/clarion-runtime
root = jif.getRootPane();
内容来源于网络,如有侵权,请联系作者删除!