public void run() { DesignComponent valueComponent = value.getComponent(); decodeValue[0] = getComponentDisplayName(valueComponent); } });
private void checkDoNothing(PropertyValue value) { if (value == null || value.getComponent() == null) { doNothingRadioButton.setSelected(true); } }
public void run() { DesignComponent command = values.get(name); List<PropertyValue> itemESValues = itemComponent.readProperty(ItemCD.PROP_COMMANDS).getArray(); for (PropertyValue esValue : itemESValues) { DesignComponent existingES = esValue.getComponent(); if (existingES.readProperty(ItemCommandEventSourceCD.PROP_COMMAND).getComponent().equals(command)) { itemCommandEvenSource[0] = existingES; break; } } } });
protected void collectRequiredComponents (Collection<DesignComponent> requiredComponents) { PropertyValue propertyValue = getComponent ().readProperty (PROP_COMMAND); DesignComponent component = propertyValue.getComponent(); if (component != null) requiredComponents.add(component); } },
public void updateState(PropertyValue value) { if (value != null) { DesignComponent eventHandler = value.getComponent(); if (eventHandler.getType().equals(PreviousScreenEventHandlerCD.TYPEID)) { radioButton.setSelected(true); } } }
private void setValue(PropertyValue value) { super.setValue(value); if (perElement == null) { return; } final DesignComponent component_ = component.get(); if (!NULL_VALUE.equals(value) && perElement.isPostSetValueSupported(component_)) { perElement.postSetValue(component_, value.getComponent()); } else if (NULL_VALUE.equals(value)) { perElement.nullValueSet(component_); } }
public boolean isRequiredToBeSet (DesignComponent component, int index) { PropertyValue propertyValue = component.readProperty (ListCD.PROP_ELEMENTS); List<PropertyValue> array = propertyValue.getArray (); DesignComponent listElement = array.get (index).getComponent (); PropertyValue string = listElement.readProperty (ListElementEventSourceCD.PROP_FONT); return string.getKind () != PropertyValue.Kind.NULL; }
protected void delete () { DesignComponent eventSource = getComponent ().readProperty (PROP_EVENT_SOURCE).getComponent (); MidpDocumentSupport.updateEventHandlerWithNew (eventSource, null); } },
@Override public boolean isRequiredToBeSet (DesignComponent component, int index) { DescriptorRegistry descriptorRegistry = component.getDocument ().getDescriptorRegistry (); List<PropertyValue> array = component.readProperty (DisplayableCD.PROP_COMMANDS).getArray (); DesignComponent commandEventSource = array.get (index).getComponent (); DesignComponent command = commandEventSource.readProperty (CommandEventSourceCD.PROP_COMMAND).getComponent (); if (command != null && descriptorRegistry.isInHierarchy (ListSelectCommandCD.TYPEID, command.getType ())) return false; return super.isRequiredToBeSet (command, index); }
public void generateParameterCode (DesignComponent component, MultiGuardedSection section, int index) { PropertyValue propertyValue = component.readProperty(ChoiceGroupCD.PROP_ELEMENTS); List<PropertyValue> array = propertyValue.getArray (); DesignComponent choiceElement = array.get (index).getComponent (); PropertyValue string = choiceElement.readProperty(ChoiceElementCD.PROP_FONT); MidpCodeSupport.generateCodeForPropertyValue (section.getWriter (), string); }
public void generateParameterCode (DesignComponent component, MultiGuardedSection section, int index) { PropertyValue propertyValue = component.readProperty(ListCD.PROP_ELEMENTS); List<PropertyValue> array = propertyValue.getArray (); DesignComponent listElement = array.get (index).getComponent (); PropertyValue string = listElement.readProperty(ListElementEventSourceCD.PROP_STRING); MidpCodeSupport.generateCodeForPropertyValue (section.getWriter (), string); }
public void generateParameterCode (DesignComponent component, MultiGuardedSection section, int index) { PropertyValue propertyValue = component.readProperty(ListCD.PROP_ELEMENTS); List<PropertyValue> array = propertyValue.getArray (); DesignComponent listElement = array.get (index).getComponent (); PropertyValue string = listElement.readProperty(ListElementEventSourceCD.PROP_IMAGE); MidpCodeSupport.generateCodeForPropertyValue (section.getWriter (), string); }
public void generateParameterCode (DesignComponent component, MultiGuardedSection section, int index) { PropertyValue propertyValue = component.readProperty(ChoiceGroupCD.PROP_ELEMENTS); List<PropertyValue> array = propertyValue.getArray (); DesignComponent listElement = array.get (index).getComponent (); PropertyValue string = listElement.readProperty(ChoiceElementCD.PROP_STRING); MidpCodeSupport.generateCodeForPropertyValue (section.getWriter (), string); }
public void generateParameterCode (DesignComponent component, MultiGuardedSection section, int index) { PropertyValue propertyValue = component.readProperty (DisplayableCD.PROP_COMMANDS); List<PropertyValue> array = propertyValue.getArray (); DesignComponent commandEventSource = array.get (index).getComponent (); MidpCodeSupport.generateCodeForPropertyValue (section.getWriter (), commandEventSource.readProperty (CommandEventSourceCD.PROP_COMMAND)); }
protected void componentsDeleting (Collection<DesignComponent> componentsToDelete) { for (String propertyName : propertyNames) { DesignComponent component = getComponent ().readProperty (propertyName).getComponent (); if (component != null && componentsToDelete.contains (component)) getComponent ().writeProperty (propertyName, PropertyValue.createNull ()); } }
protected boolean matches (GuardedSection section) { DesignComponent forward = getComponent ().readProperty (propertyName).getComponent (); if (forward == null) return false; GoToSourcePresenter presenter = forward.getPresenter (GoToSourcePresenter.class); return presenter != null && presenter.matches (section); } };
public boolean isInside(InspectorFolderPath path, InspectorFolder folder, DesignComponent component) { if (path.getPath().size() < 2 || path.getLastElement().getTypeID() != typeID) return false; int referencedIndex = path.getPath().size() - 2; long referencedComponentID = path.getPath().get(referencedIndex).getComponentID(); DesignComponent referencedComponent = component.getDocument().getComponentByUID(referencedComponentID).readProperty(propertyName).getComponent(); if (referencedComponent != null && component == referencedComponent) return true; return false; }
protected void generateMultiGuardedSectionCode (MultiGuardedSection section) { String code = CodeReferencePresenter.generateAccessCode (getComponent ().readProperty (MethodPointEventHandlerCD.PROP_METHOD_POINT).getComponent ()); if (code != null) section.getWriter ().write (code + ";\n"); // NOI18N } },
public String getEditableName (DesignComponent component) { DesignComponent refComponent = component.readProperty(PROP_COMMAND).getComponent(); if (refComponent == null || refComponent.readProperty(ClassCD.PROP_INSTANCE_NAME) == null) { Debug.warning("EventSource referenced " + component.toString() + " is null "); //NOI18N return null; } String name = (String) refComponent.readProperty(ClassCD.PROP_INSTANCE_NAME).getPrimitiveValue (); return name; }
public static DesignComponent updateEventHandlerFromTarget(DesignComponent eventSource, DesignComponent targetComponent) { assert targetComponent == null || ! targetComponent.getDocument().getDescriptorRegistry().isInHierarchy(EventHandlerCD.TYPEID, targetComponent.getType()); DesignComponent oldEventHandler = eventSource.readProperty(EventSourceCD.PROP_EVENT_HANDLER).getComponent(); AbstractEventHandlerCreatorPresenter targetPresenter = targetComponent != null ? targetComponent.getPresenter(AbstractEventHandlerCreatorPresenter.class) : null; DesignComponent newEventHandler = targetPresenter != null ? targetPresenter.createReuseEventHandler(eventSource, oldEventHandler, targetComponent) : null; return updateEventHandlerWithNew(eventSource, newEventHandler); }