Examples of JLayeredPane


Examples of javax.swing.JLayeredPane

             * @deprecated, this code remains only for backward compatability.
             * Only code generated prior to 6/8/07 will use this
             */
            Component grandMa = ((JComponent)parent).getTopLevelAncestor();
            JRootPane root = ((JComponent)parent).getRootPane();
            JLayeredPane layeredPane = getLayeredPane(grandMa);
            Component glassPane = UIutils.getGlassPane(grandMa);
            JMenuBar menuBar = root == null ? null : root.getJMenuBar();
            if (grandMa != null) {
                Insets insets = ((Container)grandMa).getInsets();
                Insets tempInsets = new Insets(0,0,0,0);

                int menuHeight = 0;
                // TF:19/09/2009:Only compensate for the menu bar if it's visible.
                if (menuBar != null && menuBar.isVisible()) {
                    // Compensate for only the height of the menu, the width is derived from the screen.
                    menuHeight = menuBar.getHeight();
                }

                // Layered pane = content pane + menu bar + insets
                if (layeredPane != null) {
                    layeredPane.getInsets(tempInsets);
                    newSize.height += menuHeight + tempInsets.top + tempInsets.bottom;
                    newSize.width += tempInsets.left + tempInsets.right;
                    if (debugEnabled) {
                      _log.debug("\tsetting layered pane size to " + newSize);
                    }
                    if (newSize.height != layeredPane.getHeight()
                            || newSize.width != layeredPane.getWidth()) {
                        layeredPane.setSize(newSize);
                    }
                }
                if (glassPane != null) {
                  if (debugEnabled) {
                    _log.debug("\tsetting glass pane size to " + newSize);
View Full Code Here

Examples of javax.swing.JLayeredPane

     * PM:5/8/07 moved this code to a new method
     * @param newSize
     */
    private void resizeJFrame(final Dimension newSize){
        Insets insets = this.frame.getInsets();
        JLayeredPane layeredPane = this.frame.getLayeredPane();
        Insets layeredPaneInsets = new Insets(0,0,0,0);
        JMenuBar menuBar = this.frame.getJMenuBar();
        int menuHeight = (menuBar == null) ? 0 : menuBar.getHeight()// Compensate for only the height of the menu, the width is derived from the screen.
        Component glassPane = this.frame.getGlassPane();
        JRootPane rootPane = this.frame.getRootPane();
        Insets RootPaneInsets = new Insets(0,0,0,0);

        // Layered pane = content pane + menu bar + insets
        if (layeredPane != null) {
            layeredPane.getInsets(layeredPaneInsets);
            // TF:20/8/07:Tests show that if we include the menu height here that our window comes out too big,
            // by the height of the menu. So setting the layered pane size must cater for this.
            newSize.height += menuHeight + layeredPaneInsets.top + layeredPaneInsets.bottom;
            newSize.width += layeredPaneInsets.left + layeredPaneInsets.right;
            if (_log.isDebugEnabled()) {
              _log.debug("\tsetting layered pane size to " + newSize);
            }
            if (newSize.height != layeredPane.getHeight()
                    || newSize.width != layeredPane.getWidth()) {
                layeredPane.setSize(newSize);
                layeredPane.revalidate();
                layeredPane.repaint();
            }
        }
        // size the glass pane
        if (glassPane != null) {
            if (_log.isDebugEnabled()) {
View Full Code Here

Examples of javax.swing.JLayeredPane

        SpinnerNumberModel model = new SpinnerNumberModel(new Integer(100), new Integer(0), new Integer(5000), new Integer(1));
        jSpinner1.setModel(model);
        JSpinner.NumberEditor editor = new JSpinner.NumberEditor(jSpinner1, "####0000");
        jSpinner1.setEditor(editor);

        JLayeredPane mnu = getLayeredPane();


        layedLabel.setFont(new Font("TAHOMA", 1, 12));
        layedLabel.setLocation(0, 0);
        layedLabel.setSize(0, 0);
        mnu.add(layedLabel);




        //this.frameMain=frameMain;
View Full Code Here

Examples of javax.swing.JLayeredPane

                {
                    hideOverlay();
                }
                else
                {
                    JLayeredPane layeredPane = getLayeredPane(overlayCapableParent);
                    if (layeredPane.isVisible() && layeredPane.isShowing())
                    {
                        putOverlay(layeredPane);
                        positionOverlay(layeredPane);
                    }
                }
View Full Code Here

Examples of javax.swing.JLayeredPane

        // sleep for a while so the gui can update itself
        Thread.sleep(500);
        formModel.revert();

        // find a reference to the overlay component
        JLayeredPane layeredPane = frame.getRootPane().getLayeredPane();
        assertEquals("sanity check: assume the layered pane only has one component, and that it is a panel and the overlay",
                     2, layeredPane.getComponentCount());
        // the overlay is the first component
        JComponent overlay = (JComponent)layeredPane.getComponent(0);
        // the overlay is now put into another panel for clipping.
        if(!"dirtyOverlay".equals(overlay.getName())) {
            assertEquals("Unable to locate overlay", "dirtyOverlay", overlay.getComponent(0).getName());
            overlay = (JComponent) overlay.getComponent(0);
        }
View Full Code Here

Examples of javax.swing.JLayeredPane

            }
            public boolean isShowing() {
                return true;
            }
            protected JLayeredPane createLayeredPane() {
                return new JLayeredPane() {
                    public boolean isVisible() {
                        return true;
                    }
                    public boolean isShowing() {
                        return true;
View Full Code Here

Examples of javax.swing.JLayeredPane

    this.layeredPane.add(this.busyLabel, 1);
  }

  private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    layeredPane = new JLayeredPane();
    panel1 = new JPanel();
    comboBox1 = new JComboBox();
    comboBox2 = new JComboBox();
    spinner1 = new JSpinner();
    CellConstraints cc = new CellConstraints();
View Full Code Here

Examples of javax.swing.JLayeredPane

            }
        }
    }
   
    private void createCodeFileTab(CodeFileInfo codeFileInfo) {
        JLayeredPane layeredPane = JLayeredPane.getLayeredPaneAbove(codeFileInfo.textPane);
        JScrollPane scrollPane = new JScrollPane(layeredPane);
        scrollPane.setBorder(null);
        JPanel tabPanel = new JPanel();
        tabPanel.setLayout(new BorderLayout());
       
View Full Code Here

Examples of javax.swing.JLayeredPane

    JPanel notebookPanel = notebook.getNotebookPanel();
    notebookPanel.setSize(300, 750);
    notebookPanel.setVisible(true);

    //Format gameboard
    JLayeredPane gameboardPane = boardView.getBoardPanel();
    gameboardPane.setSize(800, 600);
    gameboardPane.setVisible(true);

    //Format UserHand panel before adding to jfrm
    JPanel userHandPanel = hand.getUserHandPanel();
    userHandPanel.setSize(300, 750);
    userHandPanel.setVisible(true);
View Full Code Here

Examples of javax.swing.JLayeredPane

        BorderLayout layout = ( oldC.getLayout() instanceof BorderLayout )
                ? ( BorderLayout )oldC.getLayout()
                : null;

        JLayeredPane oldLayeredPane = (oldInstance instanceof JLayeredPane)
                ? (JLayeredPane) oldInstance
                : null;

        // Pending. Assume all the new children are unaltered.
        for(int i = newChildren.length; i < oldChildren.length; i++) {
            Object[] args = ( layout != null )
                    ? new Object[] {oldChildren[i], layout.getConstraints( oldChildren[i] )}
                    : (oldLayeredPane != null)
                            ? new Object[] {oldChildren[i], oldLayeredPane.getLayer(oldChildren[i]), Integer.valueOf(-1)}
                            : new Object[] {oldChildren[i]};

            invokeStatement(oldInstance, "add", args, out);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.