Package net.miginfocom.layout

Examples of net.miginfocom.layout.ComponentWrapper


    Container parent = comp.getParent();
    synchronized(parent != null ? parent.getTreeLock() : new Object()) { // 3.7.2. No sync if not added to a hierarchy. Defeats a NPE.
      if (noCheck == false && scrConstrMap.containsKey(comp) == false)
        throw new IllegalArgumentException("Component must already be added to parent!");

      ComponentWrapper cw = new SwingComponentWrapper(comp);

      if (constr == null || constr instanceof String) {
        String cStr = ConstraintParser.prepare((String) constr);

        scrConstrMap.put(comp, constr);
View Full Code Here


        }
    }

    @Override
    public void addWidget(UIWidget element, CCHint hint) {
        final ComponentWrapper cw = getWrapper(element);

        final String cStr = ConstraintParser.prepare(hint != null ? hint.cc : "");
        CC constraint = AccessController.doPrivileged(new PrivilegedAction<CC>() {
            @Override
            public CC run() {
View Full Code Here

        children.add(cw);
        dirty = true;
    }

    public void removeWidget(UIWidget element) {
        ComponentWrapper cw = wrappers.remove(element);
        ccMap.remove(cw);
        children.remove(cw);
        invalidate();
    }
View Full Code Here

    public Vector2i getMaxContentSize(Canvas canvas) {
        return getPreferredContentSize(canvas, Vector2i.zero());
    }

    private ComponentWrapper getWrapper(UIWidget comp) {
        ComponentWrapper cw;
        if (comp instanceof MigLayout) {
            MigLayout migLayout = (MigLayout) comp;
            migLayout.setParent(this);
            cw = migLayout;
        } else {
View Full Code Here

TOP

Related Classes of net.miginfocom.layout.ComponentWrapper

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.