Package java.awt

Examples of java.awt.Component


            defaultForegroundColor = getForeground();
        }

        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                                                      boolean cellHasFocus) {
            Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);

            setIcon(null)//just remove the icon entirely

            boolean isAllowed = isAllowed((String) value);
View Full Code Here


            component.setAlignmentX(ba.getAlignmentX());
            component.setAlignmentY(ba.getAlignmentY());
            anchor = null;
          }
        } else {
          Component comp = (Component) childWidget.getWidget();

          if (comp != null && comp instanceof JComponent) {
            JComponent component = (JComponent) comp;

            component.setAlignmentX(0.0f);
View Full Code Here

    super(parent, name);
    panel = new JPanel(new BorderLayout());
  }
 
  public void addChild(Widget widget, Object constraint) throws GUIException {
    Component component = widget.getWidget();
    if (constraint == null)
      constraint = BorderLayout.CENTER;
    panel.add(component, constraint);
    addChild(widget);
  }
View Full Code Here

      for (int i=0; i<widgets.size(); i++) {
        WeakReference ref = (WeakReference) widgets.get(i);
        Widget referent = (Widget) ref.get();
       
        if (referent != null) {
          Component component = referent.getWidget();
          if (component != null)
            SwingUtilities.updateComponentTreeUI(component);
        }
      }
    }
View Full Code Here

            if (    !ignoreEdit &&
                    (e.getType() == TableModelEvent.INSERT || e.getType() == TableModelEvent.UPDATE)) {

                int row = getSelectedRow();

                Component component = null;

                try {
                    component = getEditorComponent();
                } catch (Exception ignore) {}

                if (component == null) {
                    addRowToCache(row, e.getColumn());
                } else {
                    int field = getFieldForColumnIndex(e.getColumn());
                    try {
                        if (component.isEnabled() && !module.getField(field).isUiOnly())
                            addRowToCache(row, e.getColumn());
                    } catch (Exception whatever) {
                        addRowToCache(row, e.getColumn());
                    }
                }
View Full Code Here

   * @param component the component for which the Window should be returned.
   * @return the AWT-Window that is the (possibly indirect) parent of this component.
   */
  protected static Window getWindowAncestor(final Component component)
  {
    Component parent = component.getParent();
    while (parent != null)
    {
      if (parent instanceof Window)
      {
        return (Window) parent;
      }
      parent = parent.getParent();
    }
    return null;
  }
View Full Code Here

      final JComponent jc = (JComponent) c;
      jc.setDoubleBuffered(false);
      final Component[] childs = jc.getComponents();
      for (int i = 0; i < childs.length; i++)
      {
        final Component child = childs[i];
        prepareComponent(child);
      }
    }
  }
View Full Code Here

     */
    public void run()
    {
      try
      {
        final Component component = getComponent();
        if (component instanceof Window)
        {
          final Window w = (Window) component;
          w.validate();
        }
        else if (isOwnPeerConnected())
        {
          final Window w = ComponentDrawable.getWindowAncestor(component);
          if (w != null)
          {
            w.validate();
          }
        }
        else
        {
          peerSupply.pack();
          contentPane.add(component);
        }

        component.setBounds
            ((int) area.getX(), (int) area.getY(),
                (int) area.getWidth(), (int) area.getHeight());
        component.validate();
        component.paint(graphics);
      }
      finally
      {
        cleanUp();
      }
View Full Code Here

    public void run()
    {
      retval = null;
      try
      {
        final Component component = getComponent();
        if (component instanceof Window == false && isOwnPeerConnected() == false)
        {
          peerSupply.pack();
          contentPane.add(component);
          contentPane.validate();
          component.validate();
        }
        else if (isOwnPeerConnected())
        {
          retval = component.getSize();
          return;
        }
        else
        {
          component.validate();
        }
        retval = component.getPreferredSize();
      }
      finally
      {
        cleanUp();
      }
View Full Code Here

    public void run()
    {
      retval = null;
      try
      {
        final Component component = getComponent();
        if (component instanceof Window == false && isOwnPeerConnected() == false)
        {
          peerSupply.pack();
          contentPane.add(component);
        }
        retval = component.getSize();
      }
      finally
      {
        cleanUp();
      }
View Full Code Here

TOP

Related Classes of java.awt.Component

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.