Package com.ponysdk.core.instruction

Examples of com.ponysdk.core.instruction.Remove


    @Override
    public boolean remove(final PWidget w) {
        if (w.getParent() != this) return false;
        orphan(w);
        if (getChildren().remove(w)) {
            final Remove remove = new Remove(w.getID(), getID());
            Txn.get().getTxnContext().save(remove);
            return true;
        } else {
            return false;
        }
View Full Code Here


            return false;
        }
    }

    private void sendRemove(final PWidget child) {
        final Remove remove = new Remove(child.getID(), getID());
        Txn.get().getTxnContext().save(remove);
    }
View Full Code Here

        if (child.getParent() != this) { return false; }
        orphan(child);

        children.remove(child);

        final Remove remove = new Remove(child.getID(), getID());
        Txn.get().getTxnContext().save(remove);
        return true;
    }
View Full Code Here

        return item;
    }

    public boolean removeItem(final int index) {
        final PWidget item = items.remove(index);
        final Remove remove = new Remove(item.getID(), getID());
        Txn.get().getTxnContext().save(remove);
        return true;
    }
View Full Code Here

    }

    public boolean removeItem(final PMenuItem item) {
        final boolean removed = items.remove(item);
        if (removed) {
            final Remove remove = new Remove(item.getID(), getID());
            Txn.get().getTxnContext().save(remove);
        }
        return removed;
    }
View Full Code Here

    }

    public boolean removeItem(final PMenuItemSeparator item) {
        final boolean removed = items.remove(item);
        if (removed) {
            final Remove remove = new Remove(item.getID(), getID());
            Txn.get().getTxnContext().save(remove);
        }
        return removed;
    }
View Full Code Here

        } finally {
            // Logical detach.
            if (removeWidgetFromMap(widget) != null) {
                // Physical detach.
                if (physicalDetach) {
                    final Remove remove = new Remove(widget.getID(), getID());
                    Txn.get().getTxnContext().save(remove);
                }
            }
        }
        return true;
View Full Code Here

            widget.removeFromParent();
        }

        if (tree != null) {
            tree.orphan(widget);
            final Remove remove = new Remove(widget.getID(), tree.getID());
            Txn.get().getTxnContext().save(remove);
        }

        if (tree != null) {
            tree.adopt(widget, this);
View Full Code Here

    public PTreeItem addItem(final String itemHtml) {
        return addItem(new PTreeItem(itemHtml));
    }

    public boolean removeItem(final PTreeItem item) {
        final Remove add = new Remove(tree.getID(), getID());
        Txn.get().getTxnContext().save(add);
        return children.remove(item);
    }
View Full Code Here

        // Orphan.
        try {
            orphan(w);
        } finally {
            // Physical detach.
            final Remove remove = new Remove(w.getID(), getID());
            Txn.get().getTxnContext().save(remove);

            // Logical detach.
            widget = null;
        }
View Full Code Here

TOP

Related Classes of com.ponysdk.core.instruction.Remove

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.