Package com.volantis.mcs.eclipse.common.odom

Examples of com.volantis.mcs.eclipse.common.odom.ODOMElement.detach()


        // todo use XPath to get the column and rows rather than assume col/row indexes
        // Remove the appropriate column element.
        ODOMElement cols = (ODOMElement) gridContent.get(0);
        ODOMElement column =
                (ODOMElement) cols.getContent(ELEMENT_FILTER).get(colPos);
        column.detach();

        // Remove the selected column from each row.
        for (int row = 1; row <= rowCount; row++) {
            ODOMElement rowElement = (ODOMElement) gridContent.get(row);
            List rowContent = new ArrayList(rowElement.getContent(ELEMENT_FILTER));
View Full Code Here


        // Remove the selected column from each row.
        for (int row = 1; row <= rowCount; row++) {
            ODOMElement rowElement = (ODOMElement) gridContent.get(row);
            List rowContent = new ArrayList(rowElement.getContent(ELEMENT_FILTER));
            ODOMElement colCell = (ODOMElement) rowContent.get(colPos);
            colCell.detach();
        }

        // Find the "next" appropriate column in which to select, post delete.
        if (colPos == columnCount) {
            colPos--;
View Full Code Here

                    elements = new ODOMElement[children.size()];
                    int i=0;
                    while(children.size()>0) {
                        ODOMElement element = (ODOMElement) children.get(0);
                        elements[i] = element;
                        element.detach();
                        i++;
                    }
                } catch (IOException e) {
                    throw new UndeclaredThrowableException(e);
                } catch (JDOMException e) {
View Full Code Here

                    // This automatically detaches the original element
                    content.set(index, FormatPrototype.get(FormatType.EMPTY));
                }
            } else if (parent != null) {
                // Simply remove the device layout
                element.detach();
            }
        }
    }

View Full Code Here

                colCount +
                " specified)"); //$NON-NLS-1$
        } else if (colCount == 0) {
            // remove the elements that represent columns or column content
            col.detach();
            placeholder.detach();
        } else {
            ODOMElement newCol;
            ODOMElement newPlaceholder;

            for (int i = 1; i < colCount; i++) {
View Full Code Here

            List list = new ArrayList();
            list.add(replacement);
            selectionManager.setSelection(list);

        } else {
            element.detach();
        }
    }
}

/*
 
View Full Code Here

                    // Move all listeners from the current element to the
                    // restored element.
                    element.moveListeners(restoreElement);

                    // we need to detach this from the standard element
                    restoreElement.detach();
                    // updated the parent so that the restored element is
                    // restored to the correct index
                    parent.getContent().add(elementIndex, restoreElement);
                }
View Full Code Here

            // Detach the current policy element
            detach();

            // Detach the standard element and add it to the end of
            // the new policy.
            standardElement.detach();
            policy.getChildren().add(standardElement);

            // Move the listeners from the current policy to the new.
            moveListeners(policy);
View Full Code Here

        Document document = SAX_BUILDER.build(new StringReader(
                    "<root>" + xml + "</root>"));
        ODOMElement root = (ODOMElement) document.getRootElement();
        root.getChildren();
        ODOMElement realRoot = (ODOMElement) root.getChildren().get(0);
        realRoot.detach();
        return realRoot;
    }

    /**
     * Checks that the expected XML string matches the element
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.