Package org.enhydra.shark.xpdl

Examples of org.enhydra.shark.xpdl.XMLElement


        String hstr = getPanelContainer().getSettings().getSettingString("HideSubElements." + panelName + "." + cel.toName());

        String[] hstra = Utils.tokenize(hstr, " ");
        if (hstra != null) {
            for (int i = 0; i < hstra.length; i++) {
                XMLElement el = cel.get(hstra[i]);
                if (el != null) {
                    hidden.add(el);
                } else if (cel instanceof Package) {
                    Package pkg = (Package) cel;
                    if (hstra[i].equals(pkg.getNamespaces().toName())) {
View Full Code Here


                        hidden.addAll(col.toElements());
                        return hidden;
                    }
                    Iterator ci = col.toElements().iterator();
                    while (ci.hasNext()) {
                        XMLElement el = (XMLElement) ci.next();
                        if (key.equals("")) {
                            if (el.toValue().equals(hstra[i])) {
                                hidden.add(el);
                            }
                        } else {
                            if (el instanceof XMLComplexElement) {
                                XMLElement sel = ((XMLComplexElement) el).get(key);
                                if (sel != null) {
                                    if (sel.toValue().equals(hstra[i])) {
                                        hidden.add(el);
                                    }
                                }
                            }
                        }
View Full Code Here

        }
        return hidden;
    }

    protected List getColumnsToShow(String panelName, XMLCollection col) {
        XMLElement el = col.generateNewElement();
        List toShow = new ArrayList();
        if (el instanceof XMLComplexElement) {
            String hstr = getPanelContainer().getSettings().getSettingString("ShowColumns." + panelName + "." + col.toName());
            String[] hstra = Utils.tokenize(hstr, " ");
            if (hstra.length > 0) {
View Full Code Here

         return;
      }

      XMLCollection col = (XMLCollection) getOwner();
      if (JaWEManager.getInstance().getJaWEController().canRepositionElement(col, movingElement.getElement())) {
         XMLElement currentElementAtPosition = ((XMLElementView) listModel.getElementAt(newMovingElementPosition))
               .getElement();
         int newpos = owncol.indexOf(currentElementAtPosition);

         listModel.remove(movingElementPosition);
         listModel.add(newMovingElementPosition, movingElement);
View Full Code Here

   protected void fillListContent(List elementsToShow) {
      // fills list
      DefaultListModel listModel = (DefaultListModel) allParam.getModel();
      Iterator it = elementsToShow.iterator();
      while (it.hasNext()) {
         XMLElement elem = (XMLElement) it.next();
         XMLElementView ev = getRow(elem);
         listModel.addElement(ev);
      }

   }
View Full Code Here

   }

   protected void adjustActions() {
      JaWEController jc = JaWEManager.getInstance().getJaWEController();

      XMLElement selEl=getSelectedElement();
      newElementAction.setEnabled(jc.canCreateElement((XMLCollection) getOwner()));
      editElementAction.setEnabled((selEl != null && XMLUtil.getPackage(selEl)!=null));
      deleteElementAction.setEnabled((selEl != null && jc.canRemoveElement((XMLCollection)getOwner(), selEl)));

      boolean canRepos = JaWEManager.getInstance().getJaWEController().canRepositionElement((XMLCollection) getOwner(),
View Full Code Here

   public void xmlElementChanged(XMLElementChangeInfo info) {
      if (info.getAction() == XMLElementChangeInfo.REMOVED) {
         Iterator it = info.getChangedSubElements().iterator();
         while (it.hasNext()) {
            XMLElement el = (XMLElement) it.next();
            removeElement(el);
         }
      } else if (info.getAction() == XMLElementChangeInfo.INSERTED) {
         Iterator it = info.getChangedSubElements().iterator();
         while (it.hasNext()) {
            XMLElement el = (XMLElement) it.next();
            addElement(el);
         }
      }
   }
View Full Code Here

         changing = false;
         return;
      }

      if (JaWEManager.getInstance().getJaWEController().canRepositionElement(owncol, movingElement)) {
         XMLElement currentElementAtPosition = (XMLElement) allItems.getValueAt(newMovingElementPosition, 0);
         int newpos = owncol.indexOf(currentElementAtPosition);

         DefaultTableModel dtm = (DefaultTableModel) allItems.getModel();
         Vector v = getRow(movingElement);
         dtm.removeRow(movingElementPosition);
View Full Code Here

   protected Vector getColumnNames(List columnsToShow) {
      // creating a table which do not allow cell editing
      Vector cnames = new Vector();
      cnames.add("Object");
      XMLElement cel = ((XMLCollection) getOwner()).generateNewElement();
      if (cel instanceof XMLComplexElement) {
         Iterator it = columnsToShow.iterator();
         while (it.hasNext()) {
            String elemName = (String) it.next();
            XMLElement el = ((XMLComplexElement) cel).get(elemName);
            if (el != null) {
               cnames.add(JaWEManager.getInstance().getLabelGenerator().getLabel(el));
            } else {
               it.remove();
            }
View Full Code Here

         // This table colors elements depending on their owner
         public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex) {
            Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
            if (!isCellSelected(rowIndex, vColIndex) && colors) {
               XMLElement el = (XMLElement) getValueAt(rowIndex, 0);
               if (el instanceof XMLCollectionElement) {
                  XMLCollectionElement cel = (XMLCollectionElement) el;
                  XMLCollection celOwner = (XMLCollection) cel.getParent();
                  if (celOwner == null) {
                     c.setBackground(SPEC_EL_COLOR_BKG);
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.XMLElement

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.