Examples of NamedProperties


Examples of com.scooterframework.common.util.NamedProperties

                String name = key.substring(key.lastIndexOf('.') + 1);
                Properties p = PropertyFileUtil.parseNestedPropertiesFromLine(getProperty(key), nameValueSpliter, propertyDelimiter);
                p.setProperty(KEY_DB_CONNECTION_NAME, name);
                checkConnectionPoolProperties(name, p);
                if (databaseConnectionsMap.containsKey(name)) {
                    NamedProperties np = databaseConnectionsMap.get(name);
                    np.setProperties(p);
                }
                else {
                    NamedProperties np = new NamedProperties(name, p);
                    databaseConnectionsMap.put(name, np);
                }
            }
            else
            if (key.startsWith("reference.data")) {
                String name = key.substring(key.lastIndexOf('.') + 1);
                Properties p = PropertyFileUtil.parseNestedPropertiesFromLine(getProperty(key), nameValueSpliter, propertyDelimiter);
                if (referenceDataMap.containsKey(name)) {
                    NamedProperties np = referenceDataMap.get(name);
                    np.setProperties(p);
                }
                else {
                    NamedProperties np = new NamedProperties(name, p);
                    referenceDataNames.add(name);
                    referenceDataMap.put(name, np);
                }
            }
        }
View Full Code Here

Examples of com.scooterframework.common.util.NamedProperties

    public Properties getPredefinedDatabaseConnectionProperties(String connName) {
      if (connName == null)
        throw new IllegalArgumentException("Error in " +
            "getPredefinedDatabaseConnectionProperties: connName cannot be null.");

        NamedProperties np = databaseConnectionsMap.get(connName);
        return (np != null)?np.getProperties():(new Properties());
    }
View Full Code Here

Examples of com.scooterframework.common.util.NamedProperties

    /**
     * Returns properties of reference data specified by the name
     */
    public Properties getReferenceDataProperties(String referenceDataName) {
        NamedProperties np = referenceDataMap.get(referenceDataName);
        return (np != null)?np.getProperties():(new Properties());
    }
View Full Code Here

Examples of simtools.util.NamedProperties

    if(c!=null&&cshape!=null){
      Iterator it=c.iterator();
      Iterator itshape=cshape.iterator();
      while(it.hasNext()&& itshape.hasNext()){
        AbstractShape as=(AbstractShape)itshape.next();
        NamedProperties np=(NamedProperties)it.next();
        res |= as.setProperties(np,ce);
      }
    }
   
   
View Full Code Here

Examples of simtools.util.NamedProperties

      return;
    }
    DiagramSelection sel=sc.getDiagramSelection();
    final Vector v=sel.getSelectedElements();
    // look for properties initial values
    final NamedProperties initalValues=containsValidProperties(v);
    if(initalValues==null){
      return;
    }
    new LongAction(LongAction.LONG_ACTION_SHAPE, sel, e.getSource()) {
      protected void doAction() {
View Full Code Here

Examples of simtools.util.NamedProperties

   * Check if one object contains one of the valid properties
   * @param v the list of objects
   * @return the first matching object or null if none
   */
  protected NamedProperties containsValidProperties(Vector v) {
    NamedProperties initalValues = null;
    for (int i = 0; i < v.size(); i++) {
      Object o = v.get(i);
      if (o instanceof NamedProperties) {
        NamedProperties np = (NamedProperties) o;
        if (containsValidProperties(np)) {
          setProperties(np);
          initalValues = np;
          break;
        }
View Full Code Here

Examples of simtools.util.NamedProperties

    /**
     * @param v
     */
    public boolean update(Vector v) {
      NamedProperties np=containsValidProperties(v);
      if(np!=null){
        setProperties(np);
        DiagramSelectionPropertiesPanel.this.update();
        return true;
      }
View Full Code Here

Examples of simtools.util.NamedProperties

        cbRatio = new JCheckBox(resources.getString("FixedRatio"), false);
        // Transform properties
        lTransformation = new JLabel(resources.getString("transformation"));
        editTransformButton = resources.getButton("editTransform", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                NamedProperties res;
                if (transform == null) {
                    res = AffineTransformDataPanel.showDialog(PropertiesPanel1D.this.getOwner(), resources
                            .getString("transformationTitle"), new AffineTransformData());
                } else {
                    res = AffineTransformDataPanel.showDialog(PropertiesPanel1D.this.getOwner(), resources
                            .getString("transformationTitle"), transform);
                }
                if (res != null) {
                    if (transform == null) {
                        transform = new AffineTransformData();
                    }
                    String[] props = res.getPropertyNames();
                    if (props != null) {
                        for (int j = 0; j < props.length; j++) {
                            String pname = props[j];
                            Object value = res.getPropertyValue(pname);
                            transform.setPropertyValue(pname, value);
                        }
                        // Update transform with last related data
                        // source values
                        transform.notificationEnd(null);
View Full Code Here

Examples of simtools.util.NamedProperties

        Collection cshape = properties.getInnerProperties();
        if ((c != null) && (cshape != null)) {
            Iterator it = c.iterator();
            Iterator itshape = cshape.iterator();
            while (it.hasNext() && itshape.hasNext()) {
                NamedProperties as = (NamedProperties) itshape.next();
                JPropertiesPanel np = (JPropertiesPanel) it.next();
                np.setProperties(as);
            }
        }
        String[] props = properties.getPropertyNames();
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.