public static boolean isSecondaryWindow(JRootPane rp) { Component c = rp.getParent(); if (c instanceof JInternalFrame) { return true; } else { return false; } }
public void actionPerformed(ActionEvent evt) { final JDialog dialog = (JDialog) mainPanel.getRootPane().getParent(); dialog.dispose(); } });
public void actionPerformed(ActionEvent evt) { commitChanges = true; final JDialog dialog = (JDialog) mainPanel.getRootPane().getParent(); dialog.dispose(); } });
/** * Exits the dialog */ private void exit() { rootPane.getParent().setVisible(false); }
/** * Creates a new SeaGlassTitlePane object. * * @param rootPane the JRootPane containing the title pane. * @param ui the UI delegate for the root pane. */ public SeaGlassTitlePane(JRootPane rootPane, SeaGlassRootPaneUI ui) { this.rootPane = rootPane; this.rootPaneUI = ui; rootParent = (RootPaneContainer) rootPane.getParent(); installTitlePane(); }
protected void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) { // Close parent final JDialog container = (JDialog) this.getRootPane().getParent(); // System.out.println("parent = " + container); container.setVisible(false); }
/** @return the_frame, or if the_frame was never set, * it returns the parent of the root pane of text_area */ public JFrame getFrame() { if (the_frame!=null) return the_frame; return (JFrame)text_area.getRootPane().getParent(); }
/** * Exit the editor panel */ private void exit() { rootPane.getParent().setVisible(false); }
private Frame getFrame() { return (Frame)getRootPane().getParent(); }
/** * Hides the application {@code View} * @param view * @see View */ public void hide(View view) { view.getRootPane().getParent().setVisible(false); }
protected void uninstallListeners(JRootPane root) { super.uninstallListeners(root); if (DecorationHelper.getWindowDecorationStyle(root) == NONE) { if (root.getParent() instanceof Window && windowListener != null) { window = (Window) root.getParent(); window.removeWindowListener(windowListener); } root.removePropertyChangeListener(propertyChangeListener); } }
/** * @return */ private JKDialog getDialog() { if (this.pnlBlob.getRootPane() != null) { final Container cont = this.pnlBlob.getRootPane().getParent(); if (cont instanceof JKDialog) { return (JKDialog) cont;// pack the dialog reference } } return null; }
/** * Exits the annotation editor */ private void exit() { getRootPane().getParent().setVisible(false); }
/** * @param root */ private void makeFrameBackgroundTransparent(JRootPane root) { // Indicate that this frame should not make all the content // draggable. By default, when you set the opacity to 0 (like we do // below) this property automatically gets set to true. Also note // that this client property must be set *before* changing the // opacity (not sure why). root.putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE); WindowUtils.makeWindowNonOpaque((Window) root.getParent()); }
private static Window getWindow(final JComponent comp) { if (comp.getRootPane() != null) { final Container cont = comp.getRootPane().getParent(); if (cont != null) { if (cont instanceof Window) { return (Window) cont; } } } return null; }
@Override public void actionPerformed(ActionEvent e) { moreOptionsPanel.setVisible(!moreOptionsPanel.isVisible()); NbPreferences.forModule(ReportPanel.class).putBoolean(PREF_MORE_OPTIONS_PANEL_VISIBLE, moreOptionsPanel.isVisible()); JRootPane rootPane = SwingUtilities.getRootPane(ReportPanel.this); ((JDialog) rootPane.getParent()).pack(); } });
/** * Shows the application {@code View} * @param view - View to show * @see View */ public void show(View view) { Window window = (Window) view.getRootPane().getParent(); if (window != null) { window.pack(); window.setVisible(true); } }
@Override public void show(View view) { if ((mainView == null) && (view instanceof FrameView)) { mainView = (FrameView) view; } RootPaneContainer c = (RootPaneContainer) view.getRootPane().getParent(); initRootPaneContainer(c); ((Window) c).setVisible(true); }
public void show(View view) { if ((mainView == null) && (view instanceof FrameView)) { mainView = (FrameView)view; } RootPaneContainer c = (RootPaneContainer)view.getRootPane().getParent(); initRootPaneContainer(c); ((Window)c).setVisible(true); }
@Override public void run(TaskMonitor taskMonitor) throws Exception { final LoadRepositoryResult result = loadTask.getResult(); panel.initDataSources(result); logger.info("BioMart Client initialized."); ((JDialog)panel.getRootPane().getParent()).toFront(); } }