Package com.jidesoft.grid

Examples of com.jidesoft.grid.Property


            final String propertyName = (String) entry.getKey();
            final Object propertyValue = entry.getValue();

            if (!propertyName.equals("class") && !propertyName.equals("name"))
            {
                Property displayProperty = new Property(propertyName, theConfig.getPropertyDescription(propertyName), propertyValue.getClass())
                {
                    /**
           *
           */
          private static final long serialVersionUID = -4650355524853942976L;
View Full Code Here


                LoaderSupport.populateBean(bean, propertySet);

                final Map properties = PropertyUtils.describe(bean);
                final List list = new ArrayList();

                classpathIdProperty = new Property("loader", "Classpath Loader to use.", String.class)
                {
                    /**
           *
           */
          private static final long serialVersionUID = -3071689960943636606L;
          private String classpathId = config.getClasspathId();

                    public void setValue(Object value)
                    {
                        classpathId = value.toString();
                    }

                    public Object getValue()
                    {
                        return classpathId;
                    }

                    public boolean hasValue()
                    {
                        return true;
                    }
                };

                classpathIdProperty.setEditorContext(ClasspathIdCellEdtitor.CONTEXT);

                list.add(classpathIdProperty);

                for (Iterator iter = properties.entrySet().iterator(); iter.hasNext();)
                {
                    final Map.Entry entry = (Map.Entry) iter.next();
                    final String propertyName = (String) entry.getKey();
                    final Object propertyValue = entry.getValue() != null ? entry.getValue() : "";

                    if (!propertyName.equals("class") && !propertyName.equals("name"))
                    {
                        Property displayProperty = new Property(propertyName, propertyName, PropertyUtils.getPropertyType(bean, propertyName))
                        {
                            /**
               *
               */
              private static final long serialVersionUID = 1751773758147906036L;
View Full Code Here

            Hermes.class);

      for (Iterator iter = config.getWatch().iterator(); iter.hasNext();)
      {
         final WatchConfig wConfig = (WatchConfig) iter.next();
         final Property watchIdProperty = new PropertyImpl(wConfig.getId(), WATCH_INFO + " for " + wConfig.getId());

         final Property watchFrequenceProperty = new PropertyImpl(WATCH_UPDATE_FREQUENCY, new Long(wConfig.getUpdateFrequency()), WATCH_UPDATE_FREQUENCY_INFO,
               Long.class);
         final Property watchAgeAlertProperty = new PropertyImpl(WATCH_AGE_ALERT, new Long(wConfig.getDefaultAgeAlertThreshold()), WATCH_AGE_ALERT_INFO,
               Long.class);
         final Property watchDepthAlertProperty = new PropertyImpl(WATCH_DEPTH_ALERT, new Integer(wConfig.getDefaultDepthAlertThreshold()),
               WATCH_DEPTH_ALERT_INFO, Integer.class);
         final Property showAgeProperty = new PropertyImpl(SHOW_AGE, new Boolean(wConfig.isShowAge()), SHOW_AGE_INFO, Boolean.class);

         watchIdProperty.addChild(watchFrequenceProperty);
         watchIdProperty.addChild(watchAgeAlertProperty);
         watchIdProperty.addChild(watchDepthAlertProperty);
         watchIdProperty.addChild(showAgeProperty);

         watchProperty.addChild(watchIdProperty);

         //
         // Much easier to create an object here to set the values into the
         // model.

         watchSetters.add(new Runnable()
         {
            public void run()
            {
               if (showAgeProperty.getValue() != null)
               {
                  wConfig.setShowAge(((Boolean) showAgeProperty.getValue()).booleanValue());
               }

               if (watchAgeAlertProperty.getValue() != null)
               {
                  if (watchAgeAlertProperty.getValue() instanceof Long)
View Full Code Here

TOP

Related Classes of com.jidesoft.grid.Property

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.