Package java.awt

Examples of java.awt.Component.validate()


      try {
        Component comp = (Component) beanClass.newInstance();
        Dimension size = comp.getPreferredSize();
        comp.setSize(size);
        comp.doLayout();
        comp.validate();
        return comp;
      } catch (Exception e) {
        WidgetPlugin.getLogger().error(e);
      }
    }
View Full Code Here


    f.setSize(100, 100);
    f.setVisible(true);

    c.invalidate();
    h.check(!c.isValid());
    c.validate();
    h.check(c.isValid());
  }

  private void testNotShowing(TestHarness h)
  {
View Full Code Here

    Component c = new Component(){};

    c.invalidate();
    h.check(!c.isValid());
    c.validate();
    h.check(!c.isValid());
  }
}
View Full Code Here

    public void run() {
      if (!adapter.isRoot()) {
        CompositeAdapter parent = adapter.getParentAdapter();
        Component widget = parent.getWidget();
        widget.doLayout();
        widget.validate();
      } else {
        Component widget = adapter.getWidget();
        widget.doLayout();
        widget.validate();
      }
View Full Code Here

        widget.doLayout();
        widget.validate();
      } else {
        Component widget = adapter.getWidget();
        widget.doLayout();
        widget.validate();
      }
      adapter.repaintDesigner();
    }
  }
  private static Map<Class, Object> DEFAULT_BEANS= new HashMap<Class, Object>()
View Full Code Here

        if (getEditingColumn() != -1 && isHierarchical(editingColumn)) {
            Rectangle cellRect = getCellRect(realEditingRow(),
                getEditingColumn(), false);
            Component component = getEditorComponent();
            component.setBounds(cellRect);
            component.validate();
        }
    }


    /**
 
View Full Code Here

                processingRoots = new ArrayList(invalidRoots);
                invalidRoots.clear();
            }
            for (Iterator it = processingRoots.iterator(); it.hasNext(); ) {
                Component c = (Component)it.next();
                c.validate();
            }
        }
    }

    public void addDirtyRegion(final JComponent c, final int x, final int y, final int w, final int h) {
View Full Code Here

            Rectangle cellRect, int row, int column) {
        if (table.isEditing() && table.getEditingRow()==row &&
                                 table.getEditingColumn()==column) {
            Component component = table.getEditorComponent();
            component.setBounds(cellRect);
            component.validate();
        }
        else {
            TableCellRenderer renderer = table.getCellRenderer(row, column);
            Component component = table.prepareRenderer(renderer, row, column);
            Color b = component.getBackground();
View Full Code Here

    private void paintCell(SeaGlassContext context, Graphics g, Rectangle cellRect, int row, int column) {
        if (table.isEditing() && table.getEditingRow() == row && table.getEditingColumn() == column) {
            Component component = table.getEditorComponent();

            component.setBounds(cellRect);
            component.validate();
        } else {
            TableCellRenderer renderer  = table.getCellRenderer(row, column);
            Component         component = table.prepareRenderer(renderer, row, column);

            rendererPane.paintComponent(g, component, table, cellRect.x, cellRect.y, cellRect.width, cellRect.height, true);
View Full Code Here

        // Only ever removed when UI changes, this is OK!
        Component component = view.getRendererComponent(graph, focus,
            false, false);
        if (component != null) {
          graph.add(component);
          component.validate();
          Dimension d = component.getPreferredSize();
          int inset = 2 * GraphConstants.getInset(view
              .getAllAttributes());
          d.width += inset;
          d.height += inset;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.