Package java.awt

Examples of java.awt.Container$AccessibleAWTContainer$AccessibleContainerHandler


    });

    //
    // contentPane
    //
    final Container contentPane = this.getContentPane();
    contentPane.setLayout(null);

    int x = (background.getWidth(null) - BUTTON_WIDTH) / 2;
    addComponent(contentPane, loginButton, x, 300, BUTTON_WIDTH, BUTTON_HEIGHT);
    addComponent(contentPane, createAccountButton, x, 340, BUTTON_WIDTH, BUTTON_HEIGHT);
    addComponent(contentPane, helpButton, x, 380, BUTTON_WIDTH, BUTTON_HEIGHT);
View Full Code Here


   * the dropped entity.
   *
   * @param event The mouse event that triggered the drop
   */
  private void stopDrag(MouseEvent event) {
    Container parent = getParent();
    Point containerPoint = SwingUtilities.convertPoint(this, point, parent);
    // Find out the underlying component 
    Component component = SwingUtilities.getDeepestComponentAt(parent, containerPoint.x, containerPoint.y);
   
    if ((component != null) && (component instanceof DropTarget)) {
View Full Code Here

 
  /**
   * Raise the window if possible-
   */
  public void raise() {
    final Container parent = getParent();

    if (parent instanceof JLayeredPane) {
      ((JLayeredPane) parent).moveToFront(InternalManagedWindow.this);
    }
  }
View Full Code Here

 
  /**
   * Center the window within the parent component.
   */
  protected void center() {
    Container parent = getParent();
    final Dimension size = getPreferredSize();
   
    setBounds((parent.getWidth() - size.width) / 2,
        (parent.getHeight() - size.height) / 2, size.width, size.height);
  }
View Full Code Here

   *
   * @param point suggested location. The actual location can differ if the
   *   window would not fit fully within the parent
   */
  private void relocate(Point point) {
    Container parent = getParent();
   
    // Keep inside parent component
    if (point.x < 0) {
      point.x = 0;
    } else if ((point.x + getWidth()) > parent.getWidth()) {
      point.x = parent.getWidth() - getWidth();
    }

    if (point.y < 0) {
      point.y = 0;
    } else if ((point.y + getHeight()) > parent.getHeight()) {
      point.y = parent.getHeight() - getHeight();
    }

    setLocation(point);
    // Store the window location
    WtWindowManager.getInstance().moveTo(this, getX(), getY());
View Full Code Here

   */
  public void close() {
    if (hideOnClose) {
      setVisible(false);
    } else {
      Container parent = InternalWindow.this.getParent();
      if (parent != null) {
        parent.remove(InternalWindow.this);
        parent.validate();
        parent.repaint();
      }
    }
    // notify listeners
    for (CloseListener listener : closeListeners) {
      listener.windowClosed(this);
View Full Code Here

 
  @Override
  public void paint(Graphics g, JComponent tooltip) {
    // Get rid of popup borders, if it has any (Heavy weight popups tend to
    // pack the tooltip in a JPanel
    Container parent = tooltip.getParent();
    if (parent instanceof JComponent) {
      JComponent popup = (JComponent) parent;
      if (popup.getBorder() != null) {
        popup.setBorder(null);
      }
View Full Code Here

  private static final long serialVersionUID = -6501303401258684529L;

    public boolean getScrollableTracksViewportWidth() {
      boolean retVal = super.getScrollableTracksViewportWidth();
        if (autoResizeMode == AUTO_RESIZE_OFF) {
            Container parent = getParent();
            if (parent instanceof JViewport) {
                    retVal =  (parent.getSize().getWidth() > getPreferredSize().getWidth());
            }
        }
        return retVal;
   
    }
View Full Code Here

                if (mv.getClickCount() > 0) {
                    if (!(aWTEvent.getSource() instanceof Component)) {
                        return;
                    }
                    Component comp = (Component) aWTEvent.getSource();
                    Container par = SwingUtilities.getAncestorNamed("jpopuppane", comp); //NOI18N
                    Container barpar = SwingUtilities.getAncestorOfClass(ancestor.getClass(), comp);
                    if (par == null && barpar == null) {
                        hidePopup();
                    }
                }
            }
View Full Code Here

    /** Creates a new instance of JColChooserDialog */
    public JColChooserDialog(JMainFrame frame, JColChooserData[] dataArray)
    {
        super(frame, true);
        setTitle(Main.getString("colchooser_caption"));
        Container cp = getContentPane();
        cp.setLayout(new BorderLayout());
        JPanel panel = new JPanel();
        Arrays.sort(dataArray, new JColChooserDataComparator(true));
        for (JColChooserData data : dataArray)
        {
            m_comboBox.addItem(data);
        }
        m_comboBox.setBorder(new EmptyBorder(10, 0, 0, 0));
        Dimension dim = m_comboBox.getPreferredSize();
        m_comboBox.setPreferredSize(new Dimension(200, (int)dim.getHeight()));
        panel.add(m_comboBox);

        JPanel panel2 = new JPanel();
        panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS));
        panel2.setBorder(new EmptyBorder(5, 0, 10, 10));
        panel2.add(Box.createHorizontalGlue());

        JButton ok = new JButton(Main.getString("ok"));
        ok.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent ev)
            {
                m_bOk = true;
                dispose();
                }
        });
        dim = ok.getPreferredSize();
        ok.setPreferredSize(new Dimension(100, (int)dim.getHeight()));
        panel2.add(ok);
        panel2.add(Box.createRigidArea(new Dimension(5, 0)));

        JButton cancel = new JButton(Main.getString("cancel"));
        cancel.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent ev)
            {
                dispose();
            }
        });
        dim = cancel.getPreferredSize();
        cancel.setPreferredSize(new Dimension(100, (int)dim.getHeight()));
        panel2.add(cancel);

        cp.add(panel, BorderLayout.NORTH);
        cp.add(panel2, BorderLayout.SOUTH);

        setPreferredSize(new Dimension(240, 130));
        setResizable(false);
        setLocationRelativeTo(frame);
        pack();
View Full Code Here

TOP

Related Classes of java.awt.Container$AccessibleAWTContainer$AccessibleContainerHandler

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.