Package javax.swing

Examples of javax.swing.JLayeredPane


    setFocusable(true);
    setLayout(new DesignerLayout());

    glass = new GlassPlane(this);
    add(glass);
    popupLayer = new JLayeredPane();
    add(popupLayer);
    glass.addKeyListener(this);

    container = new ContainerPane();
View Full Code Here


  private JLabel waitLabel;
  private JButton closeButton;
  private WeatherData lastWeatherData;

  public WeatherPanel(MainFrame pParentFrame, CitySearchData pCitySearch) {
    layers = new JLayeredPane();
    contentPanel = new JPanel();
    contentPanel.setLayout(new GridLayout(1, 1));
    contentPanel.setOpaque(false);
    citySearchData = pCitySearch;
    parentFrame = pParentFrame;
View Full Code Here

     * @param root      content the <code>JComponent</code> to use for the
     *                  window title pane.
     * @param titlePane the SeaGlassTitlePane.
     */
    private void setTitlePane(JRootPane root, JComponent titlePane) {
        JLayeredPane layeredPane  = root.getLayeredPane();
        JComponent   oldTitlePane = getTitlePane();

        if (oldTitlePane != null) {
            oldTitlePane.setVisible(false);
            layeredPane.remove(oldTitlePane);
        }

        if (titlePane != null) {
            layeredPane.add(titlePane, JLayeredPane.FRAME_CONTENT_LAYER);
            titlePane.setVisible(true);
        }

        this.titlePane = titlePane;
    }
View Full Code Here

    _viewPort = _scrollPane.getViewport();

    _zoomWindow = new JLabel();
    _cursorLabel = createCursor();

    _layeredPane = new JLayeredPane();

    _layeredPane.add( _zoomWindow, new Integer( 0 ) );
    _layeredPane.add( _cursorLabel, new Integer( 1 ) );

    // Creates a blank transparent cursor to be used as the cursor of
View Full Code Here

        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

             * @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

     * 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

     * 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

        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

            }
        };
        btnAbort.setAction(abortAction);

        KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
        JLayeredPane layeredPane = getLayeredPane();
        layeredPane.getActionMap().put("cancel", abortAction);
        layeredPane.getInputMap(
            JComponent.WHEN_IN_FOCUSED_WINDOW).put(stroke, "abort");
    }
View Full Code Here

TOP

Related Classes of javax.swing.JLayeredPane

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.