Package javax.swing

Examples of javax.swing.JLayeredPane$AccessibleJLayeredPane


   * Set up the stepChart JLayeredPane to accept the chart,
   * the shadow rectangle, and other attributes.
   */
  private void loadChartPanel()
  {
    stepChart = new JLayeredPane();
    resetBaseComponents();
   
   
   
    //resizeChartPanel();
View Full Code Here


 
  /** Set the overlay component to be displayed.
   * @param component the overlay component to display, null to remove any displayed component
   */
  public void setOverlay(Component component) {
    JLayeredPane layeredPane = getLayeredPane();
    if (overlayComponent != null) {
      layeredPane.remove(overlayComponent);
    }
    overlayComponent = component;
    if (overlayComponent != null) {
      layeredPane.add(overlayComponent, JLayeredPane.PALETTE_LAYER);
      resizeOverlayComponent();
    }
  }
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

    private Border getNoNonsenseBorder() {
        return new LineBorder(Color.BLACK, 3);
    }

    private JComponent createCenterDisplay() {
        JLayeredPane pane = new JLayeredPane();
        pane.setLayout(null);
        JLabel iconLabel = createBoundedIconLabel();
        pane.add(iconLabel, JLayeredPane.DEFAULT_LAYER);
        if (displayVersion) {
            JLabel versionNumberLabel = createBoundedVersionNumberLabel();
            pane.add(versionNumberLabel, JLayeredPane.PALETTE_LAYER);
        }
        Dimension prefSize = iconLabel.getSize();
        prefSize.width += 20;
        prefSize.height += 10;
        pane.setPreferredSize(prefSize);
        return pane;
    }
View Full Code Here

        panel.setSize(w, h);
        pane.add(panel, new Integer(layer));
    }

    protected JLayeredPane getObject() {
        JLayeredPane pane = new JLayeredPane();
        init(pane, 0, 25, 25, 50, 50, Color.RED);
        init(pane, 1, 10, 10, 50, 50, Color.BLUE);
        init(pane, 2, 40, 40, 50, 50, Color.YELLOW);
        pane.setSize(200, 200);
        return pane;
    }
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) {
                    lp.putClientProperty(TRANSPARENT_OLD_OPAQUE,
                                         Boolean.valueOf(lp.isOpaque()));
                    lp.setOpaque(false);
                    root.putClientProperty(TRANSPARENT_OLD_OPAQUE,
                                           Boolean.valueOf(root.isOpaque()));
                    root.setOpaque(false);
                    if (content != null) {
                        content.putClientProperty(TRANSPARENT_OLD_OPAQUE,
                                                  Boolean.valueOf(content.isOpaque()));
                        content.setOpaque(false);
                    }
                    root.putClientProperty(TRANSPARENT_OLD_BG,
                                           root.getParent().getBackground());
                }
                else {
                    lp.setOpaque(Boolean.TRUE.equals(lp.getClientProperty(TRANSPARENT_OLD_OPAQUE)));
                    root
                        .setOpaque(Boolean.TRUE.equals(root.getClientProperty(TRANSPARENT_OLD_OPAQUE)));
                    if (content != null) {
                        content.setOpaque(Boolean.TRUE.equals(content.getClientProperty(TRANSPARENT_OLD_OPAQUE)));
                    }
View Full Code Here

                public void run() {
                    User32 user = User32.INSTANCE;
                    HWND hWnd = getHWnd(w);
                    int flags = user.GetWindowLong(hWnd, User32.GWL_EXSTYLE);
                    JRootPane root = ((RootPaneContainer)w).getRootPane();
                    JLayeredPane lp = root.getLayeredPane();
                    if (transparent && !isTransparent(w)) {
                        flags |= User32.WS_EX_LAYERED;
                        user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
                        lp.add(new W32RepaintTrigger(), JLayeredPane.DRAG_LAYER);
                    }
                    else if (!transparent && isTransparent(w)) {
                        flags &= ~User32.WS_EX_LAYERED;
                        user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
                        RepaintTrigger.remove(lp);
View Full Code Here

    /*
     * Panel that holds the radio buttons, also create radio button group,
     * so that only one may be selected at a time.
     */
    JLayeredPane PizzaSize = new JLayeredPane();
    PizzaSize.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    PizzaSize.setBorder(BorderFactory.createTitledBorder("Size"));
    PizzaSize.setBounds(12, 0, 207, 126);
    contentPane.add(PizzaSize);
    PizzaSize.setLayout(new GridLayout(0, 1, 0, 0));

    rdbtnSmallPizza = new JRadioButton("Small ($8.00)");
    rdbtnSmallPizza.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
        if (rdbtnSmallPizza.isSelected()) {
          pizzaTotal = 8.00;
          UpdateTotal();
        }
      }
    });
    PizzaSize.add(rdbtnSmallPizza);

    rdbtnMediumPizza = new JRadioButton("Medium ($10.00)");
    rdbtnMediumPizza.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
        if (rdbtnMediumPizza.isSelected()) {
          pizzaTotal = 10.00;
          UpdateTotal();
        }
      }
    });
    PizzaSize.add(rdbtnMediumPizza);

    rdbtnLargePizza = new JRadioButton("Large ($12.00)");
    rdbtnLargePizza.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
        if (rdbtnLargePizza.isSelected()) {
          pizzaTotal = 12.00;
          UpdateTotal();
        }
      }
    });
    PizzaSize.add(rdbtnLargePizza);

    rdbtnXLargePizza = new JRadioButton("Extra-Large ($14.00)");
    rdbtnXLargePizza.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
        if (rdbtnXLargePizza.isSelected()) {
          pizzaTotal = 14.00;
          UpdateTotal();
        }
      }
    });
    PizzaSize.add(rdbtnXLargePizza);

    /*
     * Create button group for radio buttons
     */
    ButtonGroup bg = new ButtonGroup();
View Full Code Here

            public void run() {
                windows = WindowManager.getDefault();
                Registry reg = windows.getRegistry();
                JFrame frame = (JFrame) windows.getMainWindow();
                JRootPane pane = frame.getRootPane();
                JLayeredPane layered = pane.getLayeredPane();
                Object[] comps = layered.getComponents();
                for (int i = 0; i < comps.length; i++) {
                    if (comps[i] instanceof MenuBar) {
                        MenuBar bar = (MenuBar) comps[i];
                        bar.waitFinished();
                        int num = bar.getMenuCount();
View Full Code Here

    setUndecorated(true);
    setResizable(false);
    setIconImages(ScreenRunner.icons);
    setTitle(I18n.get("ui/splash/title"));
    URL imgURL = ScreenRunner.class.getClassLoader().getResource(image);
    JLayeredPane pane = new JLayeredPane();
    ImageIcon img = new ImageIcon(imgURL, "ScreenRunner");
    JLabel imgLbl = new JLabel(img);
    imgLbl.setVerticalAlignment(JLabel.TOP);
    imgLbl.setBounds(0, 0, 400, 250);
    versionLabel = new JLabel(version);
    versionLabel.setOpaque(false);
    versionLabel.setBackground(new Color(0.0f, 0.0f, 0.0f, 0.0f));
    versionLabel.setForeground(new Color(172, 252, 255));
    versionLabel.setBounds(18, 16, 364, 120);
    versionLabel.setHorizontalAlignment(JLabel.RIGHT);
    versionLabel.setVerticalAlignment(JLabel.BOTTOM);
   
    statusLabel = new JLabel(status);
    statusLabel.setOpaque(false);
    statusLabel.setBackground(new Color(0.0f, 0.0f, 0.0f, 0.0f));
    statusLabel.setForeground(new Color(172, 252, 255));
    statusLabel.setBounds(18, 16, 364, 210);
    statusLabel.setHorizontalAlignment(JLabel.LEFT);
    statusLabel.setVerticalAlignment(JLabel.BOTTOM);
   
    pane.add(versionLabel, 300);
    pane.add(statusLabel, 310);
    pane.add(imgLbl, 200);
    add(pane, BorderLayout.CENTER);
   
    progressBar = new JProgressBar(SwingConstants.HORIZONTAL);
    add(progressBar, BorderLayout.SOUTH);
   
View Full Code Here

TOP

Related Classes of javax.swing.JLayeredPane$AccessibleJLayeredPane

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.