Package java.awt

Examples of java.awt.Container.validate()


        setMinimumSize(new Dimension(newWidth, (int) getMinimumSize().getHeight()));
        setPreferredSize(new Dimension(newWidth, (int) getPreferredSize().getHeight()));
        setMaximumSize(new Dimension(newWidth, (int) getMaximumSize().getHeight()));
        final Container p = getParent();
        if (p != null) {
            p.validate();
            p.repaint();
        }
    }

    /** Sets the height of the widget. */
 
View Full Code Here


            label.setPreferredSize(new Dimension((int) label.getPreferredSize().getWidth(), newHeight));
            label.setMaximumSize(new Dimension((int) label.getMaximumSize().getWidth(), newHeight));
        }
        final Container p = getParent();
        if (p != null) {
            p.validate();
            p.repaint();
        }
    }

    final JComponent getJComponent() {
View Full Code Here

            if (w instanceof Page) {
                ((Page) w).reset();
            }
            if (parent != null) {
                parent.remove(w.getJComponent());
                parent.validate();
                parent.repaint();
            }
        }

        //We now reset, the blockcanvas, the factory, and the renderableblocks
View Full Code Here

            arrow.updateArrow();

            if (arrow.getParent() == null) {
                parentContainer.add(arrow);
            }
            parentContainer.validate();
            parentContainer.repaint();
            active = true;
        }
    }
View Full Code Here

    public void mouseReleased(MouseEvent e) {
        if (createdRB != null) {
            if (!createdRB_dragged) {
                Container parent = createdRB.getParent();
                parent.remove(createdRB);
                parent.validate();
                parent.repaint();
            } else {
                //translate this e to a MouseEvent for createdRB
                MouseEvent newE = SwingUtilities.convertMouseEvent(this, e, createdRB);
                createdRB.mouseReleased(newE);
View Full Code Here

        }

        Container parent = block.getParent();
        if (parent != null) {
            parent.remove(block);
            parent.validate();
        }

        block.setParentWidget(null);
        Workspace workspace = block.getWorkspace();
        workspace.notifyListeners(new WorkspaceEvent(workspace, widget, block.getBlockID(), WorkspaceEvent.BLOCK_REMOVED));
View Full Code Here

        //remove from the current this.parent Container if non-null
        Container oldParent = this.getParent();
        if (oldParent != null) {
            oldParent.remove(this);
            oldParent.remove(arrow.arrow);
            oldParent.validate();
            oldParent.repaint();
        }
        //add this to newparent Container if non-null
        if (newparent != null) {
            if (constraints == null) {
View Full Code Here

        }

        Container parent = block.getParent();
        if (parent != null) {
            parent.remove(block);
            parent.validate();
            parent.repaint();
            block.setParentWidget(null);
        }

        //fire to workspace that block was removed
View Full Code Here

  }
 
  protected void removePanel () {
    Container parent = this.getParent();
    parent.remove(this);
    parent.validate();
    parent.repaint();
  }

  public void setName(String name){
    this.name = name;
View Full Code Here

    //layout everything new
    Container parent = panel;
    while (parent.getParent() != null)
       parent = parent.getParent();
    //panel.validate();
    parent.validate();
   
  }
 
 
 
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.