support.setName(p.getName()); support.setDisplayName(p.getDisplayName()); support.setShortDescription(p.getShortDescription()); support.setPropertyEditorClass(p.getPropertyEditorClass());
support.setName (p.getName ()); support.setDisplayName (p.getDisplayName ()); support.setShortDescription (p.getShortDescription ()); support.setPropertyEditorClass (p.getPropertyEditorClass ());
support.setName (p.getName ()); support.setDisplayName (p.getDisplayName ()); support.setShortDescription (p.getShortDescription ()); support.setPropertyEditorClass (p.getPropertyEditorClass ());
id.setName("Id"); //NOI18N id.setDisplayName("Id"); id.setShortDescription(""); //NOI18N PropertySupport.Reflection name = new PropertySupport.Reflection<String>(info, String.class, "getName", null); //NOI18N name.setName("name"); //NOI18N name.setDisplayName("Name"); name.setShortDescription(""); //NOI18N PropertySupport.Reflection type = new PropertySupport.Reflection<String>(info, String.class, "getType", null); //NOI18N type.setName("type"); //NOI18N local.setName("local"); //NOI18N local.setDisplayName("Local"); local.setShortDescription(""); PropertySupport.Reflection localRepoLocation = new PropertySupport.Reflection<String>(info, String.class, "getRepositoryPath", null); //NOI18N localRepoLocation.setName("repositoryPath"); //NOI18N
p.setName("fromOutcome"); // NOI18N p.setDisplayName(NbBundle.getMessage(NavigationCaseEdge.class, "Outcome")); // NOI18N p.setShortDescription(NbBundle.getMessage(NavigationCaseEdge.class, "OutcomeHint")); // NOI18N ss.put(p); p.setName("fromView"); // NOI18N p.setDisplayName(NbBundle.getMessage(NavigationCaseEdge.class, "FromAction")); // NOI18N p.setShortDescription(NbBundle.getMessage(NavigationCaseEdge.class, "FromActionHint")); // NOI18N p.setName("toViewId"); // NOI18N p.setDisplayName(NbBundle.getMessage(NavigationCaseEdge.class, "ToViewId")); // NOI18N p.setShortDescription(NbBundle.getMessage(NavigationCaseEdge.class, "ToViewHint")); // NOI18N
artifactId.setName("artifactId"); //NOI18N artifactId.setDisplayName(org.openide.util.NbBundle.getMessage(DependencyNode.class, "PROP_Artifact")); artifactId.setShortDescription(""); //NOI18N PropertySupport.Reflection groupId = new PropertySupport.Reflection<String>(art, String.class, "getGroupId", null); //NOI18N groupId.setName("groupId"); //NOI18N groupId.setDisplayName(org.openide.util.NbBundle.getMessage(DependencyNode.class, "PROP_Group")); groupId.setShortDescription(""); //NOI18N PropertySupport.Reflection version = new PropertySupport.Reflection<String>(art, String.class, "getVersion", null); //NOI18N version.setName("version"); //NOI18N version.setDisplayName(org.openide.util.NbBundle.getMessage(DependencyNode.class, "PROP_Version")); version.setShortDescription(org.openide.util.NbBundle.getMessage(DependencyNode.class, "HINT_Version")); PropertySupport.Reflection type = new PropertySupport.Reflection<String>(art, String.class, "getType", null); //NOI18N type.setName("type"); //NOI18N
property.setShortDescription(propertyDescription); property.setPropertyEditorClass(editorClass);
@Override protected Sheet createSheet() { Sheet s = Sheet.createDefault(); Set ss = s.get("general"); // NOI18N if (ss == null) { ss = new Sheet.Set(); ss.setName("general"); // NOI18N ss.setDisplayName(NbBundle.getMessage(Pin.class, "General")); // NOI18N ss.setShortDescription(NbBundle.getMessage(Pin.class, "GeneralHint")); // NOI18N s.put(ss); } Set gs = ss; try { PropertySupport.Reflection p = new Reflection<String>(pageContentItem, String.class, "getName", "setName"); // NOI18N p.setName("fromView"); // NOI18N p.setDisplayName(NbBundle.getMessage(Pin.class, "FromView")); // NOI18N p.setShortDescription(NbBundle.getMessage(Pin.class, "FromViewHint")); // NOI18N ss.put(p); p = new Reflection<String>(pageContentItem, String.class, "getFromOutcome", "setFromOutcome"); // NOI18N p.setName("fromOutcome"); // NOI18N p.setDisplayName(NbBundle.getMessage(Pin.class, "Outcome")); // NOI18N p.setShortDescription(NbBundle.getMessage(Pin.class, "OutcomeHint")); // NOI18N ss.put(p); } catch (NoSuchMethodException nsme) { ErrorManager.getDefault().notify(nsme); } return s; } }
/** * Create a property, with a particular {@link PropertyEditor}. A particular * editor must be specified when the property type don't have a registered * editor class. * The parameter <code>propertyName</code> will be used as the canonical name of the <code>LayoutProperty</code>. * @param layout The layout instance * @param valueType The type of the property value, ex: <code>Double.class</code> * @param propertyName The display name of the property * @param propertyCategory A category string or <code>null</code> for using * default category * @param propertyDescription A description string for the property * @param getMethod The name of the get method for this property, must exist * to make Java reflexion working. * @param setMethod The name of the set method for this property, must exist * to make Java reflexion working. * @param editorClass A <code>PropertyEditor</code> class for the given type * @return the created property * @throws NoSuchMethodException if the getter or setter methods cannot be found */ public static LayoutProperty createProperty(Layout layout, Class valueType, String propertyName, String propertyCategory, String propertyDescription, String getMethod, String setMethod, Class<? extends PropertyEditor> editorClass) throws NoSuchMethodException { PropertySupport.Reflection property = new PropertySupport.Reflection( layout, valueType, getMethod, setMethod); property.setName(propertyName); property.setShortDescription(propertyDescription); property.setPropertyEditorClass(editorClass); return new LayoutProperty(property, propertyCategory, propertyName); }