/** * Get a boolean property. * @param type The type. * @return Returns false if the property is not set. */ public boolean getBooleanProperty(String type) { Property prop = getLatestProperty(type); //return prop!=null && Boolean.parseBoolean(prop.getValue()); return prop!=null && Boolean.valueOf(prop.getValue()).booleanValue(); }
/** * Get a long property. * @param type The type. * @return Returns the parsed long value, 0 if not set. */ public static long getLongProperty(Properties[] props, String type) { Property prop = getLatestProperty(props, type); return prop==null? 0: Long.parseLong(prop.getValue()); }
/** * Get a long property. * @param type The type. * @return Returns the parsed long value, 0 if not set. */ public long getLongProperty(String type) { Property prop = getLatestProperty(type); return prop==null? 0: Long.parseLong(prop.getValue()); }
/** * Get a string property. * @param type The type. * @return Returns the string value or null if not set. */ public String getStringProperty(String type) { Property prop = getLatestProperty(type); return prop==null? null: prop.getValue(); }
/** * Advices the the panel to restore its properties from the argument */ public IFuture<Void> setProperties(Properties ps) { Property settings = ps.getProperty(PROPERTY_GUI_REFRESH); if(settings!=null) { sprefresh.setValue(Integer.valueOf(settings.getValue())); } return IFuture.DONE; }
/** * Get a double property. * @param type The type. * @return Returns the parsed double value, 0 if not set. */ public double getDoubleProperty(String type) { Property prop = getLatestProperty(type); return prop==null? 0: Double.parseDouble(prop.getValue()); }
/** * Get a boolean property. * @param type The type. * @return Returns false if the property is not set. */ public static boolean getBooleanProperty(Properties[] props, String type) { Property prop = getLatestProperty(props, type); return prop!=null && Boolean.valueOf(prop.getValue()).booleanValue(); }
/** * Get a string property. * @param type The type. * @return Returns the string value or null if not set. */ public static String getStringProperty(Properties[] props, String type) { Property prop = getLatestProperty(props, type); return prop==null? null: prop.getValue(); }
/** * Get an int property. * @param type The type. * @return Returns the parsed int value, 0 if not set. */ public int getIntProperty(String type) { Property prop = getLatestProperty(type); return prop==null? 0: Integer.parseInt(prop.getValue()); }
/** * Get an int property. * @param type The type. * @return Returns the parsed int value, 0 if not set. */ public static int getIntProperty(Properties[] props, String type) { Property prop = getLatestProperty(props, type); return prop==null? 0: Integer.parseInt(prop.getValue()); }
/** * Advices the the panel to restore its properties from the argument */ public IFuture<Void> setProperties(Properties ps) { Property settings = ps.getProperty(PROPERTY_GUI_REFRESH); if(settings!=null) { sprefresh.setValue(Integer.valueOf(settings.getValue())); } return IFuture.DONE; }
/** * Set the properties. * @param props The properties. */ public void setProperties(Properties props) { Property[] columnprops = props.getProperties("columnwidth"); TableColumnModel cm = getColumnModel(); for(int i=0; i<cm.getColumnCount() && i<columnprops.length; i++) { cm.getColumn(i).setPreferredWidth(Integer.parseInt(columnprops[i].getValue())); } } }
/** * Set the properties. * @param props The properties. */ public void setProperties(Properties props) { Property[] columnprops = props.getProperties("columnwidth"); TableColumnModel cm = getColumnModel(); for(int i=0; i<cm.getColumnCount() && i<columnprops.length; i++) { cm.getColumn(i).setPreferredWidth(Integer.parseInt(columnprops[i].getValue())); } } }
/** * Set the properties. * @param props The properties. */ public void setProperties(Properties props) { Property[] columnprops = props.getProperties("columnwidth"); TableColumnModel cm = getColumnModel(); for(int i=0; i<cm.getColumnCount() && i<columnprops.length; i++) { cm.getColumn(i).setPreferredWidth(Integer.parseInt(columnprops[i].getValue())); } } }
/** * Set the properties. * @param props The properties. */ public void setProperties(Properties props) { Property[] columnprops = props.getProperties("columnwidth"); TableColumnModel cm = getColumnModel(); for(int i=0; i<cm.getColumnCount() && i<columnprops.length; i++) { cm.getColumn(i).setPreferredWidth(Integer.parseInt(columnprops[i].getValue())); } } }
/** * Set the settings as properties. */ public void setProperties(Properties props) { for(int i=model.getRowCount()-1; i>=0; i--) { model.removeRow(i); } Property[] entries = props.getProperties("ENTRY"); for(int i=0; i<entries.length; i++) { model.addRow(new Object[]{new File(entries[i].getValue())}); } } }
public void customResultAvailable(IControlCenterPlugin plg) { if(plg!=null) { newpls.add(new Tuple2<IControlCenterPlugin, JComponent>(plg, getPluginComponent(plg))); toolbarvis.put(plg, Boolean.valueOf(ps[i].getValue())); } if(i+1<ps.length) { loadPlugins(ps, i+1, newpls, cl).addResultListener(new SwingDelegationResultListener<Void>(ret)); } else { ret.setResult(null); } } });
public void customResultAvailable(IControlCenterPlugin plg) { if(plg!=null) { newpls.add(new Tuple2<IControlCenterPlugin, JComponent>(plg, getPluginComponent(plg))); toolbarvis.put(plg, Boolean.valueOf(ps[i].getValue())); } if(i+1<ps.length) { loadPlugins(ps, i+1, newpls, cl).addResultListener(new SwingDelegationResultListener<Void>(ret)); } else { ret.setResult(null); } } });
/** * Set the properties of the mechanism. */ public void setProperties(Properties props) { // System.out.println("setProps"); if(props.getProperty("ttpcid")!=null) { IComponentIdentifier cid = props.getProperty("ttpcid").getValue()!=null? new BasicComponentIdentifier(props.getProperty("ttpcid").getValue()): null; setTTPCid(cid); // setTTPCid((IComponentIdentifier)JavaReader.objectFromXML(props.getProperty("responses").getValue(), null); } else if(props.getProperty("verify")!=null) { setverify(props.getBooleanProperty("verify")); } } }
/** * Set the properties of the mechanism. */ public void setProperties(Properties props) { // System.out.println("setProps"); if(props.getProperty("ttpcid")!=null) { IComponentIdentifier cid = props.getProperty("ttpcid").getValue()!=null? new ComponentIdentifier(props.getProperty("ttpcid").getValue()): null; setTTPCid(cid); // setTTPCid((IComponentIdentifier)JavaReader.objectFromXML(props.getProperty("responses").getValue(), null); } else if(props.getProperty("verify")!=null) { setverify(props.getBooleanProperty("verify")); } } }