Package javax.swing

Examples of javax.swing.RootPaneContainer


  private final Cursor CROSSHAIR_CURSOR = Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);
  private final Cursor DEFAULT_CURSOR = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);

  private void setCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(CROSSHAIR_CURSOR);
    root.getGlassPane().setVisible(true);
  }
View Full Code Here


    root.getGlassPane().setCursor(CROSSHAIR_CURSOR);
    root.getGlassPane().setVisible(true);
  }

  private void clearCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(DEFAULT_CURSOR);
    root.getGlassPane().setVisible(false);
  }
View Full Code Here

  private final Cursor CROSSHAIR_CURSOR = Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);
  private final Cursor DEFAULT_CURSOR = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);

  private void setCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(CROSSHAIR_CURSOR);
    root.getGlassPane().setVisible(true);
  }
View Full Code Here

    root.getGlassPane().setCursor(CROSSHAIR_CURSOR);
    root.getGlassPane().setVisible(true);
  }

  private void clearCrosshairCursor() {
    RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
    root.getGlassPane().setCursor(DEFAULT_CURSOR);
    root.getGlassPane().setVisible(false);
  }
View Full Code Here

        protected void setLayersTransparent(Window w, boolean transparent) {

            Color bg = transparent ? new Color(0, 0, 0, 0) : null;
            if (w instanceof RootPaneContainer) {
                RootPaneContainer rpc = (RootPaneContainer)w;
                JRootPane root = rpc.getRootPane();
                JLayeredPane lp = root.getLayeredPane();
                Container c = root.getContentPane();
                JComponent content =
                    (c instanceof JComponent) ? (JComponent)c : null;
                if (transparent) {
View Full Code Here

        private OSXMaskingContentPane installMaskingPane(Window w) {
            OSXMaskingContentPane content;
            if (w instanceof RootPaneContainer) {
                // TODO: replace layered pane instead?
                final RootPaneContainer rpc = (RootPaneContainer)w;
                Container oldContent = rpc.getContentPane();
                if (oldContent instanceof OSXMaskingContentPane) {
                    content = (OSXMaskingContentPane)oldContent;
                }
                else {
                    content = new OSXMaskingContentPane(oldContent);
                    // TODO: listen for content pane changes
                    rpc.setContentPane(content);
                }
            }
            else {
                Component oldContent = w.getComponentCount() > 0 ? w.getComponent(0) : null;
                if (oldContent instanceof OSXMaskingContentPane) {
View Full Code Here

  public RootPaneContainerAdapter(String name) {
    super(name);
  }
  @Override
  public Component getContentArea(){
    RootPaneContainer rootPaneContainer = (RootPaneContainer) getWidget();
    return rootPaneContainer.getRootPane();
  }
View Full Code Here

   * Used to test restoring of workspace to simulate applet restart
   * @param old
   * @return
   */
  public GraphicManager restart(GraphicManager old) {
    RootPaneContainer con = (RootPaneContainer) old.getContainer();
    old.encodeWorkspace();
    old.cleanUp();
    con.getContentPane().removeAll();
    GraphicManager g = instanceFromExistingSession((Container) con);
//    g.decodeWorkspace();

//    System.out.println("restarted");
    return g;
View Full Code Here

        assertFalse(floatingFrame.isResizable());
    }

    public void testCreateFloatingWindow() {
        toolBar.setName("The toolbar");
        RootPaneContainer floatingWindow = ui.createFloatingWindow(toolBar);
        assertTrue(floatingWindow instanceof JDialog);
        JDialog floatingFrame = (JDialog) floatingWindow;
        assertFalse(floatingFrame.isAncestorOf(toolBar));
        assertEquals("The toolbar", floatingFrame.getTitle());
        assertTrue(floatingFrame.getWindowListeners().length > 0);
View Full Code Here

            return nonRolloverBorder;
        }

        @Override
        protected RootPaneContainer createFloatingWindow(final JToolBar toolbar) {
            RootPaneContainer result = super.createFloatingWindow(toolbar);
            if (result instanceof Container) {
                floatingWindow = (Container) result;
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of javax.swing.RootPaneContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.