waitingComponent = wizardPanel.getRootPane().getContentPane(); waitingComponent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); changeStateInProgress = true;
@Override public final void remove(Component comp) { root.getContentPane().remove(comp); }
class instellingenhandler implements ActionListener { public void actionPerformed(ActionEvent e) { System.out.println("..."); JRootPane rootPane = SwingUtilities.getRootPane(Gast1.this); CardLayout layout = (CardLayout) rootPane.getContentPane().getLayout(); layout.show(rootPane.getContentPane(), "Beheer"); } }
/** * Returns the content pane for this Popup. * * @return the content pane */ public Container getContentPane() { return getRootPane().getContentPane(); }
private void replaceContentPaneChild(JComponent oldChild, JComponent newChild, String constraint) { Container contentPane = getRootPane().getContentPane(); if (oldChild != null) { contentPane.remove(oldChild); } if (newChild != null) { contentPane.add(newChild, constraint); } }
private void replaceContentPaneChild(JComponent oldChild, JComponent newChild, String constraint) { Container contentPane = getRootPane().getContentPane(); if (oldChild != null) { contentPane.remove(oldChild); } if (newChild != null) { contentPane.add(newChild, constraint); } }
@Override public final LayoutManager getLayout() { return root.getContentPane().getLayout(); }
/** * Called by the constructor to set up the <code>JRootPane</code>. * * @return a new <code>JRootPane</code> * @see javax.swing.JRootPane */ protected JRootPane createRootPane() { JRootPane pane = new JRootPane(); // by default, the subclass BorderLayout cause memory leak if isPopupVolatile in AbstractComboBox. pane.getContentPane().setLayout(new BorderLayout()); pane.setOpaque(false); // on Nimbus L&F, JRootPane is opaque by default. So we have to set it to false explicitly. return pane; }
public static void setJPanelMenuBar(JPanel parent, JPanel child, JMenuBar menuBar) { parent.removeAll(); parent.setLayout(new BorderLayout()); JRootPane root = new JRootPane(); parent.add(root, BorderLayout.CENTER); root.setJMenuBar(menuBar); root.getContentPane().add(child); parent.putClientProperty("root", root); //if you need later }
private Component getComp() { EditorWindow editorWindow = (EditorWindow) SwingUtilities.getAncestorOfClass( EditorWindow.class, comp); if (editorWindowUsed && editorWindow != null) { return editorWindow.getRootPane().getContentPane(); } else { return comp; } }
private void showWaitCursor () { if (wizardPanel == null || wizardPanel.getRootPane () == null) { // if none root pane --> don't set wait cursor return ; } waitingComponent = wizardPanel.getRootPane ().getContentPane (); waitingComponent.setCursor (Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR)); }
private void showWaitCursor () { if (wizardPanel == null || wizardPanel.getRootPane () == null) { // if none root pane --> don't set wait cursor return ; } waitingComponent = wizardPanel.getRootPane ().getContentPane (); waitingComponent.setCursor (Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR)); }
Composite composite_tree = new Composite(unitPriceChngeComposite12, SWT.EMBEDDED); composite_tree.setBounds(20, 207, 230, 398); Frame frame = SWT_AWT.new_Frame(composite_tree); Panel panel = new Panel(); frame.add(panel); panel.setLayout(new BorderLayout(0, 0)); JRootPane rootPane = new JRootPane(); panel.add(rootPane); tree_unitPrice = new JTree(); rootPane.getContentPane().add(tree_unitPrice, BorderLayout.NORTH);
private void forward(MouseEvent e) { Container contentPane = rootPane.getContentPane(); Point p = SwingUtilities.convertPoint(HighlightablePanel.this, e.getPoint(), contentPane); Component target = contentPane.findComponentAt(p); if (target != null) { e = SwingUtilities.convertMouseEvent(HighlightablePanel.this, e, target); target.dispatchEvent(e); } } };
private void showWaitCursor () { if (getRootPane () == null) return ; contentPane = getRootPane ().getContentPane (); if (SwingUtilities.isEventDispatchThread ()) { contentPane.setCursor (Utilities.createProgressCursor (contentPane)); } else { SwingUtilities.invokeLater (new CursorR (contentPane,Utilities.createProgressCursor (contentPane))); } }
private void showWaitCursor () { if (getRootPane () == null) return ; contentPane = getRootPane ().getContentPane (); if (SwingUtilities.isEventDispatchThread ()) { contentPane.setCursor (Utilities.createProgressCursor (contentPane)); } else { SwingUtilities.invokeLater (new CursorR (contentPane,Utilities.createProgressCursor (contentPane))); } }
private Rectangle calculateBounds(Component overlayComponent) { JRootPane rootPane = SwingUtilities.getRootPane(overlayComponent); Rectangle rect = SwingUtilities.convertRectangle(overlayComponent.getParent(), overlayComponent.getBounds(), rootPane.getContentPane()); JMenuBar menuBar = rootPane.getJMenuBar(); rect.x += MARGIN; rect.y += MARGIN + (menuBar == null ? 0 : menuBar.getHeight()); rect.width -= MARGIN * 2; rect.height -= MARGIN * 2; return rect; }
//original source: Sun, java/awt/Window.java, setLayersOpaque(Component, boolean) private static void setLayersTransparent(JFrame frame) { JRootPane root = frame.getRootPane(); root.setOpaque(false); root.setDoubleBuffered(false); Container c = root.getContentPane(); if (c instanceof JComponent) { JComponent content = (JComponent) c; content.setOpaque(false); content.setDoubleBuffered(false); } frame.setBackground(new Color(0, 0, 0, 0)); }
@Override void postInitSwingComponent() { super.postInitSwingComponent(); fileChooser = new JFileChooser(); getSwingComponent().getContentPane().add(fileChooser); getSwingComponent().layout(); FileDialog fd = (FileDialog) getAWTComponent(); setFile(fd.getFile()); setDirectory(fd.getDirectory()); setFilenameFilter(fd.getFilenameFilter()); }
@Override public void layoutContainer(Container parent) { currLM.layoutContainer(parent); JRibbonFrame ribbonFrame = JRibbonFrame.this; if (ribbonFrame.getRootPane().getWindowDecorationStyle() != JRootPane.NONE) keyTipLayer .setBounds(ribbonFrame.getRootPane().getBounds()); else keyTipLayer.setBounds(ribbonFrame.getRootPane() .getContentPane().getBounds()); }