Package DisplayProject

Examples of DisplayProject.GridCell


        super(pComponent);
        this.gravity = value;
    }
    public void performAction() {
        if (this._component != null) {
          GridCell gbc = GridField.getConstraints((JComponent)this._component);
            gbc.setCellGravity(gravity);
        }
    }
View Full Code Here


    public static int get(JComponent comp){
        FieldWidgetGravity action = ActionMgr.getAction(comp, FieldWidgetGravity.class);
        if (action != null) {
            return action.getGravity();
        }
        GridCell gbc = GridField.getConstraints((JComponent)comp);
        return gbc.getCellGravity();
    }
View Full Code Here

        target.setPreferredSize(source.isPreferredSizeSet() ? source.getPreferredSize() : null);
        target.setMinimumSize(source.isMinimumSizeSet() ? source.getMinimumSize() : null);
        target.setMaximumSize(source.isMaximumSizeSet() ? source.getMaximumSize() : null);
       
        if (source instanceof JComponent) {
          GridCell orig = GridCell.getExisting((JComponent)source);
          if (orig != null) {
            GridCell cell = GridCell.get((JComponent)target);
            cell.setWidthPolicy(orig.getWidthPolicy());
            cell.setHeightPolicy(orig.getHeightPolicy());
          }
          // TF:03/11/2008:We need to clone specific client properties too, otherwise some things won't work.
          ArrayFieldCellHelper.cloneComponentArrayParts((JComponent)source, (JComponent)target);
        }
    }
View Full Code Here

    public RightMargin(Component pComponent, int value) {
        super(pComponent);
        this.margin = value;
    }
    public void performAction() {
        GridCell gbc = null;
        if (this._component != null) {
            // TF:20/8/07:Adapted to use new GridField static methods
            gbc = GridField.getConstraints((JComponent)this._component);
            gbc.setRightMargin(UIutils.milsToPixels(margin));
        }
    }
View Full Code Here

        RightMargin action = ActionMgr.getAction(comp, RightMargin.class);
        if (action != null) {
            return action.margin;
        }
        // TF:20/8/07:Adapted to use new GridField static methods
        GridCell gbc = GridField.getConstraints(comp);
        return UIutils.pixelsToMils(gbc.getRightMargin());
    }
View Full Code Here

    public TopMargin(Component pComponent, int value) {
        super(pComponent);
        this.margin = value;
    }
    public void performAction() {
        GridCell gbc = null;
        if (this._component != null) {
            // TF:20/8/07:Adapted to use new GridField static methods
            gbc = GridField.getConstraints((JComponent)this._component);
            gbc.setTopMargin(UIutils.milsToPixels(margin));
        }
    }
View Full Code Here

        TopMargin action = ActionMgr.getAction(comp, TopMargin.class);
        if (action != null) {
            return action.margin;
        }
        // TF:20/8/07:Adapted to use new GridField static methods
        GridCell gbc = GridField.getConstraints(comp);
        return UIutils.pixelsToMils(gbc.getTopMargin());
    }
View Full Code Here

            (((JScrollPane)this._component).getViewport().getComponent(0) instanceof ArrayField)){
          this.arrayFieldSpecialCase(((ArrayField)((JScrollPane)this._component).getViewport().getComponent(0)));
         
        }

        GridCell gbc = GridField.getConstraints((JComponent)this._component);
        gbc.setWidthPolicy(policy);
        if (comp.getParent() != null) {
            comp.getParent().invalidate();
            comp.getParent().validate();
        }
    }
View Full Code Here

    public Row(Component pComponent, int value) {
        super(pComponent);
        this.Row = value;
    }
    public void performAction() {
        GridCell gbc = null;
        if (this._component != null) {
            // TF:20/8/07:Adapted to use new GridField helper methods for abstraction
            gbc = GridField.getConstraints((JComponent)this._component);
            gbc.setRow( Row - 1 );
        }
    }
View Full Code Here

        Row action = ActionMgr.getAction(comp, Row.class);
        if (action != null) {
            return action.getRow();
        }
        // TF:20/8/07:Adapted to use new GridField static methods
        GridCell gbc = GridField.getConstraints(comp);
        return gbc.getRow() + 1;
    }
View Full Code Here

TOP

Related Classes of DisplayProject.GridCell

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.