Package java.awt

Examples of java.awt.Container$DropTargetEventTargetFilter


   *
   * @return the parent root pane container for this disclosure triangle
   *         container or null if one does not exist
   */
  private Container getParentRootPaneContainer() {
    Container c = this;
    while (!(c instanceof RootPaneContainer)) {
      if (c.getParent() == null) {
        return null;
      }
      c = c.getParent();
    }
    return c;
  }
View Full Code Here


  public static void main( final String[] arg ) {
    JFrame jf = new JFrame( "Experimenting skip inverted indices..." );

    jf.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    jf.setSize( 600, 400 );
    Container jfc = jf.getContentPane();
    jfc.setLayout( new BorderLayout() );

    DrawPanel dp = new DrawPanel();
    jfc.add( new InputPanel( dp ), BorderLayout.SOUTH );
    jfc.add( dp, BorderLayout.CENTER );

    jf.setVisible( true );
  }
View Full Code Here

   */
  public static void positionDialogRelativeToParent(final Dialog dialog,
                                                    final double horizontalPercent,
                                                    final double verticalPercent)
  {
    final Container parent = dialog.getParent();
    if (parent == null || (parent.isVisible() == false))
    {
      positionFrameOnScreen(dialog, horizontalPercent, verticalPercent);
      return;
    }

    final Dimension d = dialog.getSize();
    final Dimension p = parent.getSize();

    final int baseX = parent.getX();
    final int baseY = parent.getY();

    final int parentPointX = baseX + (int) (horizontalPercent * p.width);
    final int parentPointY = baseY + (int) (verticalPercent * p.height);

    final int dialogPointX = Math.max (0, parentPointX - (int) (horizontalPercent * d.width));
    final int dialogPointY = Math.max (0, parentPointY - (int) (verticalPercent * d.height));

    // make sure the dialog fits completely on the screen...
    final Rectangle s = parent.getGraphicsConfiguration().getBounds();
    final Rectangle r = new Rectangle(dialogPointX, dialogPointY, d.width, d.height);
    final Rectangle intersectedDialogBounds = r.intersection(s);
    if (intersectedDialogBounds.width < d.width)
    {
      r.x = s.width - d.width;
View Full Code Here

public class DocumentInternalFrame extends JInternalFrame
{
  public DocumentInternalFrame()
  {
    super("Document", true, true, true, true);
    final Container contentPane = getContentPane();
    contentPane.setLayout(new FlowLayout());
    contentPane.add(new JLabel("Some text"));
    contentPane.add(new JButton("A button"));
    contentPane.add(new JLabel("Some more text"));
  }
View Full Code Here

    if (frame == null)
    {
      return;
    }
    final Rectangle bounds = frame.getBounds();
    final Container parent = frame.getParent();
    final boolean visible = frame.isVisible();
    final int layer = frame.getLayer();

    // now print ..
    previewReport(frame);

    if (parent != null)
    {
      if (frame.getParent() != parent)
      {
        frame.getParent().remove(frame);
        parent.add(frame);
      }
    }
    frame.setBounds(bounds);
    frame.setVisible(visible);
    frame.setLayer(new Integer(layer));
View Full Code Here

  private void deepEnable(final Component comp, final boolean state)
  {
    comp.setEnabled(state);
    if (comp instanceof Container)
    {
      final Container cont = (Container) comp;
      final Component[] childs = cont.getComponents();
      for (int i = 0; i < childs.length; i++)
      {
        deepEnable(childs[i], state);
      }
    }
View Full Code Here

        if (display == null) {
            display = createDisplay(owner, displayType);
        }

        Container displayWindow = display.getWindow();
        checkBounds(displayWindow, x, y, width, height);

        display.show(x, y);

        setComponentLocation(displayWindow.getLocation());
        setComponentSize(displayWindow.getSize());
    }
View Full Code Here

            setVisible(false);
            return new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN);
        }

        public void setContent(Component content) {
            Container cp = getContentPane();
            // cp.removeAll();
            cp.add(content);
            pack();
        }
View Full Code Here

            setVisible(false);
            return new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN);
        }

        public void setContent(Component content) {
            Container cp = getContentPane();
            cp.removeAll();
            cp.add(content);
            pack();
        }
View Full Code Here

            setVisible(false);
            return new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN);
        }

        public void setContent(Component content) {
            Container cp = getContentPane();
            cp.removeAll();
            cp.add(content);
            pack();
        }
View Full Code Here

TOP

Related Classes of java.awt.Container$DropTargetEventTargetFilter

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.