Java 类org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor 实例源码

项目:Open_Source_ECOA_Toolset_AS5    文件:LinkPropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
    properties.add(new TextPropertyDescriptor(TYPE, "Type"));
    if (link.getSource() instanceof ModuleOperationNode) {
        properties.add(new ComboBoxPropertyDescriptor(SINST, "Source Instance Name", getInstances((ModuleTypeNode) link.getSource().getParent())));
    } else {
        properties.add(new TextPropertyDescriptor(SINST, "Source Instance Name"));
    }
    if (link.getTarget() instanceof ModuleOperationNode) {
        properties.add(new ComboBoxPropertyDescriptor(TINST, "Target Instance Name", getInstances((ModuleTypeNode) link.getTarget().getParent())));
    } else {
        properties.add(new TextPropertyDescriptor(TINST, "Target Instance Name"));
    }
    if (link.getSource() instanceof TriggerInstanceTerminalNode || link.getTarget() instanceof TriggerInstanceTerminalNode)
        properties.add(new TextPropertyDescriptor(PERIOD, "Period"));
    return properties.toArray(new IPropertyDescriptor[0]);
}
项目:Open_Source_ECOA_Toolset_AS5    文件:NodePropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
    if (node instanceof LogicalSystemNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_ID, "System Id"));
    } else if (node instanceof LogicalComputingPlatformNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_ID, "Platform Id"));
    } else if (node instanceof LogicalComputingNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_ID, "Node Id"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.LOG_SYS_NODE_ENDIAN, "Endianess", ENDIAN_OPTS));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_OS_NAME, "OS Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_OS_VER, "OS Version"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_AVAIL_MEM_GB, "Available Memory (GB)"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_MOD_SWITCH_TIME, "Switch Time (�s)"));
    } else if (node instanceof LogicalProcessorsNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_PROC_NUM, "Number"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_PROC_TYPE, "Type"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_SYS_STEP_DUR, "Step Duration (ns)"));
    }
    return properties.toArray(new IPropertyDescriptor[0]);
}
项目:Open_Source_ECOA_Toolset_AS5    文件:NodePropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
    if (node instanceof CompositeNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.COMPOSITE_NAME, "Composite Name"));
    } else if (node instanceof ComponentNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.COMPONENT_NAME, "Component Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.COMPONENT_TYPE, "Component Type", getComponentDefs()));
    } else if (node instanceof ComponentPropertyNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
    } else if (node instanceof CompositePropertyNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
    } else if (node instanceof ServiceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Definition"));
    } else if (node instanceof ReferenceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Definition"));
    }
    return properties.toArray(new IPropertyDescriptor[0]);
}
项目:SPLevo    文件:PropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {

    ComboBoxPropertyDescriptor variabilityTypeDescriptor = new ComboBoxPropertyDescriptor(
            PROPERTY_ID_VARIABILITYTYPE, "Variability Type", variabilityTypes.toArray(new String[] {}));
    variabilityTypeDescriptor.setCategory(CATEGORY_CHARACTERISTICS);

    ComboBoxPropertyDescriptor bindingTimeDescriptor = new ComboBoxPropertyDescriptor(PROPERTY_ID_BINDINGTIME,
            "Binding Time", bindingTimes.toArray(new String[] {}));
    bindingTimeDescriptor.setCategory(CATEGORY_CHARACTERISTICS);

    ComboBoxPropertyDescriptor extensibilityDescriptor = new ComboBoxPropertyDescriptor(PROPERTY_ID_EXTENSIBILITY,
            "Extensible", extensibilities.toArray(new String[] {}));
    extensibilityDescriptor.setCategory(CATEGORY_CHARACTERISTICS);

    VariabilityMechanismPropertyDescriptor variabilityMechanismDescriptor = new VariabilityMechanismPropertyDescriptor(
            PROPERTY_ID_VARIABILITY_MECHANISM, "Variability Mechanism");
    variabilityMechanismDescriptor.setCategory(CATEGORY_REALIZATION);

    return new IPropertyDescriptor[] { variabilityTypeDescriptor, bindingTimeDescriptor, extensibilityDescriptor,
            variabilityMechanismDescriptor };
}
项目:seg.jUCMNav    文件:ResponsibilityPropertySource.java   
/**
 * @param descriptors
 * @param attr
 * @param propertyid
 */
private void responsibilityDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    if (((RespRef) getEditableValue()).getDiagram() == null || ((RespRef) getEditableValue()).getDiagram().getUrndefinition() == null)
        return;
    URNspec urn = ((RespRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
    Vector list = new Vector(urn.getUrndef().getResponsibilities());
    Collections.sort(list, new EObjectClassNameComparator());
    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((Responsibility) list.get(i));
        if (values[i] == null)
            values[i] = "[unnamed]"; //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:KPIInformationElementPropertySource.java   
/**
 * @param descriptors
 * @param attr
 * @param propertyid
 */
private void kpiInformationElementDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    if (((KPIInformationElementRef) getEditableValue()).getDiagram().getUrndefinition() == null)
        return;
    URNspec urn = ((KPIInformationElementRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
    Vector list = new Vector(urn.getGrlspec().getKpiInformationElements());
    Collections.sort(list, new EObjectClassNameComparator());

    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((KPIInformationElement) list.get(i));
        if (values[i] == null)
            values[i] = Messages.getString("KPIInformationElementPropertySource.Unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$ 
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:ContainerPropertySource.java   
/**
 * @param descriptors
 * @param attr
 * @param propertyid
 */
private void componentElementDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    if (((IURNContainerRef) getEditableValue()).getDiagram() == null || ((IURNContainerRef) getEditableValue()).getDiagram().getUrndefinition() == null)
        return;
    URNspec urn = ((IURNContainerRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
    Vector list;
    if (getEditableValue() instanceof UCMmodelElement) {
        list = new Vector(urn.getUrndef().getComponents());
    } else {
        list = new Vector(urn.getGrlspec().getActors());
    }
    Collections.sort(list, new EObjectClassNameComparator());

    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((IURNContainer) list.get(i));
        if (values[i] == null)
            values[i] = Messages.getString("ContainerPropertySource.unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("ContainerPropertySource.reference")); //$NON-NLS-1$
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:IntentionalElementPropertySource.java   
/**
 * @param descriptors
 * @param attr
 * @param propertyid
 */
private void intentionalElementDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    if (getEditableValue() == null || ((IntentionalElementRef) getEditableValue()).getDiagram() == null
            || ((IntentionalElementRef) getEditableValue()).getDiagram().getUrndefinition() == null)
        return;
    URNspec urn = ((IntentionalElementRef) getEditableValue()).getDiagram().getUrndefinition().getUrnspec();
    Vector list = new Vector(urn.getGrlspec().getIntElements());
    Collections.sort(list, new EObjectClassNameComparator());

    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((IntentionalElement) list.get(i));
        if (values[i] == null)
            values[i] = Messages.getString("IntentionalElementPropertySource.Unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "definition", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("EObjectPropertySource.reference")); //$NON-NLS-1$ 
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:IntentionalElementPropertySource.java   
/**
 * Creates a drop down list for strategy groups.
 * 
 * @param descriptors
 * @param propertyid
 */
private void kpiConversionDescriptor(Collection descriptors, PropertyID propertyid) {
    Vector list = getKPIConversionList();

    String[] values = new String[list.size() + 1];
    values[0] = "(undefined)";
    for (int i = 0; i < list.size(); i++) {

        values[i + 1] = EObjectClassNameComparator.getSortableElementName((KPIConversion) list.get(i));
        if (values[i + 1] == null)
            values[i + 1] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "KPI Conversion", values);
    pd.setCategory("KPI Model Strategy");
    descriptors.add(pd);
}
项目:seg.jUCMNav    文件:URNElementPropertySource.java   
/**
 * Creates a drop down list for scenario groups.
 * 
 * @param descriptors
 * @param propertyid
 */
private void scenarioGroupDescriptor(Collection descriptors, PropertyID propertyid) {
    if (((ScenarioDef) getEditableValue()).getGroup() == null || ((ScenarioDef) getEditableValue()).getGroup().getUcmspec() == null)
        return;
    URNspec urn = ((ScenarioDef) getEditableValue()).getGroup().getUcmspec().getUrnspec();
    Vector list;
    list = new Vector(urn.getUcmspec().getScenarioGroups());
    Collections.sort(list, new EObjectClassNameComparator());

    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((ScenarioGroup) list.get(i));
        if (values[i] == null)
            values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "group", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("URNElementPropertySource.ScenarioStrategy")); //$NON-NLS-1$
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:URNElementPropertySource.java   
/**
 * Creates a drop down list for strategy groups.
 * 
 * @param descriptors
 * @param propertyid
 */
private void strategyGroupDescriptor(Collection descriptors, PropertyID propertyid) {
    if (((EvaluationStrategy) getEditableValue()).getGroup() == null || ((EvaluationStrategy) getEditableValue()).getGroup().getGrlspec() == null)
        return;
    URNspec urn = ((EvaluationStrategy) getEditableValue()).getGroup().getGrlspec().getUrnspec();
    Vector list;
    list = new Vector(urn.getGrlspec().getGroups());
    Collections.sort(list, new EObjectClassNameComparator());

    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((StrategiesGroup) list.get(i));
        if (values[i] == null)
            values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "group", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("URNElementPropertySource.ScenarioStrategy")); //$NON-NLS-1$
    descriptors.add(pd);
}
项目:seg.jUCMNav    文件:URNElementPropertySource.java   
/**
 * Creates a drop down list for contribution context groups.
 * 
 * @param descriptors
 * @param propertyid
 */
private void contributionContextGroupDescriptor(Collection descriptors, PropertyID propertyid) {
    if (((ContributionContext) getEditableValue()).getGroups().size() == 0
            || ((ContributionContextGroup) ((ContributionContext) getEditableValue()).getGroups().get(0)).getGrlspec() == null)
        return;
    URNspec urn = ((ContributionContextGroup) ((ContributionContext) getEditableValue()).getGroups().get(0)).getGrlspec().getUrnspec();
    Vector list;
    list = new Vector(urn.getGrlspec().getContributionGroups());
    Collections.sort(list, new EObjectClassNameComparator());

    String[] values = new String[list.size()];
    for (int i = 0; i < list.size(); i++) {

        values[i] = EObjectClassNameComparator.getSortableElementName((ContributionContextGroup) list.get(i));
        if (values[i] == null)
            values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, "group", values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("URNElementPropertySource.ScenarioStrategy")); //$NON-NLS-1$
    descriptors.add(pd);

}
项目:convertigo-eclipse    文件:XMLTableDescriptionColumnTreeObject.java   
@Override
protected IPropertyDescriptor[] loadDescriptors() {
    IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[3];
    propertyDescriptors[0] = new TextPropertyDescriptor("tagname", "Column tag name");
    ((PropertyDescriptor)propertyDescriptors[0]).setCategory("Configuration");
    propertyDescriptors[1] = new TextPropertyDescriptor("colxpath", "Column XPath");
    ((PropertyDescriptor)propertyDescriptors[1]).setCategory("Selection");
    propertyDescriptors[2] = new ComboBoxPropertyDescriptor("extract", "Extract children", new String[]{"false","true"});
    ((PropertyDescriptor)propertyDescriptors[2]).setCategory("Selection");
    return propertyDescriptors;
}
项目:convertigo-eclipse    文件:XMLRecordDescriptionRowTreeObject.java   
@Override
protected IPropertyDescriptor[] loadDescriptors() {
    IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[3];
    propertyDescriptors[0] = new TextPropertyDescriptor("name", "Data tag name");
    ((PropertyDescriptor)propertyDescriptors[0]).setCategory("Configuration");
    propertyDescriptors[1] = new TextPropertyDescriptor("xpath", "Data XPath");
    ((PropertyDescriptor)propertyDescriptors[1]).setCategory("Selection");
    propertyDescriptors[2] = new ComboBoxPropertyDescriptor("extract", "Extract children", new String[]{"false","true"});
    ((PropertyDescriptor)propertyDescriptors[2]).setCategory("Selection");
    return propertyDescriptors;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:NodePropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
    if (node instanceof DeploymentNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.DEP_LOG_SYS, "Logical System"));
        properties.add(new TextPropertyDescriptor(NodeConstants.DEP_FINAL_ASSMBL, "Final Assembly"));
    } else if (node instanceof ProtectionDomainNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.EXEC_ON_COMP_NODE, "Execution Computing Node", getCNNames()));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_COMP_PLAT, "Execution Platform", getPCNames()));
    } else if (node instanceof ComputingNodeConfigurationNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Computing Node"));
        properties.add(new TextPropertyDescriptor(NodeConstants.COMP_NODE_SCHED_INFO, "Scheduling Information"));
    } else if (node instanceof PlatformConfigurationNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_COMP_PLAT, "Platform"));
        properties.add(new TextPropertyDescriptor(NodeConstants.PLAT_CONF_NOTIF_MAX, "Max Notifications"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_PLAT_MCAST_ADDR, "Multicast Address"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_PLAT_PORT, "Port"));
        properties.add(new TextPropertyDescriptor(NodeConstants.LOG_PLAT_ID, "Platform Id"));
    } else if (node instanceof DeployedModuleInstanceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_COMP_NAME, "Component Instance"));
        properties.add(new TextPropertyDescriptor(NodeConstants.DEP_MOD_INST_NAME, "Module Instance"));
        properties.add(new TextPropertyDescriptor(NodeConstants.DEP_MOD_PRIORITY, "Priority"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.PD_NAME, "Protection Domain", getPDNames()));
    } else if (node instanceof DeployedTriggerInstanceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_COMP_NAME, "Component Instance"));
        properties.add(new TextPropertyDescriptor(NodeConstants.DEP_TRG_INST_NAME, "Trigger Instance"));
        properties.add(new TextPropertyDescriptor(NodeConstants.DEP_TRG_PRIORITY, "Priority"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.PD_NAME, "Protection Domain", getPDNames()));
    }
    return properties.toArray(new IPropertyDescriptor[0]);
}
项目:Open_Source_ECOA_Toolset_AS5    文件:NodePropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
    if (node instanceof CompositeNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.COMPOSITE_NAME, "Composite Name"));
    } else if (node instanceof ComponentNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.COMPONENT_NAME, "Component Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.COMPONENT_TYPE, "Component Type"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.COMPONENT_INST, "Implementation", getComponentImpl()));
    } else if (node instanceof ComponentPropertyNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
    } else if (node instanceof CompositePropertyNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_PROP, "Property Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VAL, "Property Value"));
    } else if (node instanceof ServiceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Definition"));
    } else if (node instanceof ServiceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Interface"));
    } else if (node instanceof ReferenceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_INTF, "Interface"));
    }
    return properties.toArray(new IPropertyDescriptor[0]);
}
项目:ermaster-k    文件:ERDiagramPropertySource.java   
public IPropertyDescriptor[] getPropertyDescriptors() {
    List<String> dbList = DBManagerFactory.getAllDBList();

    return new IPropertyDescriptor[] { new ComboBoxPropertyDescriptor(
            "database", ResourceString.getResourceString("label.database"),
            dbList.toArray(new String[dbList.size()])) };
}
项目:ForgedUI-Eclipse    文件:Button.java   
/**
 * Do the color property stuff here.
 */
@Override
protected void handleProperty(ArrayList<IPropertyDescriptor> descriptors, String fieldName, Class<?> fieldType,
        Field f) {
    // Adding the color property descriptor here for the button.
    if (STYLE.equals(fieldName)) {
        descriptors.add(new ComboBoxPropertyDescriptor(f, fieldName, styles));
    }
    super.handleProperty(descriptors, fieldName, fieldType, f);
}
项目:ForgedUI-Eclipse    文件:ScrollableView.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    List<IPropertyDescriptor> fullList = new ArrayList<IPropertyDescriptor>();
    fullList.addAll(Arrays.asList(super.getPropertyDescriptors()));
    List<String> views = getViewNames();
    ComboBoxPropertyDescriptor cur = new ComboBoxPropertyDescriptor(PROP_CURRENT_PAGE, PROP_CURRENT_PAGE,
            views.toArray(new String[views.size()]));
    fullList.add(cur);

    return fullList.toArray(new IPropertyDescriptor[fullList.size()]);
}
项目:ForgedUI-Eclipse    文件:Tab.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    List<IPropertyDescriptor> fullList = new ArrayList<IPropertyDescriptor>();
    fullList.addAll(Arrays.asList(super.getPropertyDescriptors()));
    fullList.add(new ComboBoxPropertyDescriptor("window", "window", getAwailableWindows()));

    return fullList.toArray(new IPropertyDescriptor[fullList.size()]);
}
项目:PDFReporter-Studio    文件:MEllipse.java   
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *          the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
    super.createPropertyDescriptors(desc, defaultsMap);

    ComboBoxPropertyDescriptor fillD = new ComboBoxPropertyDescriptor(JRBaseStyle.PROPERTY_FILL, Messages.common_fill,
            EnumHelper.getEnumNames(FillEnum.values(), NullEnum.INHERITED));
    fillD.setDescription(Messages.MEllipse_fill_description);
    desc.add(fillD);

    setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#graphicElement");
}
项目:erflute    文件:ERDiagramPropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    final List<String> dbList = DBManagerFactory.getAllDBList();

    return new IPropertyDescriptor[] { new ComboBoxPropertyDescriptor("database", DisplayMessages.getMessage("label.database"),
            dbList.toArray(new String[dbList.size()])) };
}
项目:ermaster-nhit    文件:ERDiagramPropertySource.java   
public IPropertyDescriptor[] getPropertyDescriptors() {
    List<String> dbList = DBManagerFactory.getAllDBList();

    return new IPropertyDescriptor[] { new ComboBoxPropertyDescriptor(
            "database", ResourceString.getResourceString("label.database"),
            dbList.toArray(new String[dbList.size()])) };
}
项目:xeda    文件:MessageRoute.java   
public IPropertyDescriptor[] getPropertyDescriptors() {
    IPropertyDescriptor[] descriptors;
    descriptors = new IPropertyDescriptor[] { 
            new TextPropertyDescriptor(PROP_ROUTE_ID, PROP_ROUTE_ID), 
            new ComboBoxPropertyDescriptor(PROP_STYLE, PROP_STYLE, RouteStyle.getNames()),
            };
    return descriptors;
}
项目:seg.jUCMNav    文件:URNElementPropertySource.java   
/**
 * @param descriptors
 * @param propertyid
 */
private void enumerationDescriptor(Collection descriptors, PropertyID propertyid) {
    EClassifier type = getFeatureType(propertyid.getFeature());
    Class enumer = type.getInstanceClass();
    String[] values = getEnumerationValues(enumer);
    // String name = enumer.getName().substring(enumer.getName().lastIndexOf('.') + 1);
    String name = propertyid.getFeature().getName();
    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, name, values);
    pd.setCategory(Messages.getString("EObjectPropertySource.misc")); //$NON-NLS-1$
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:URNElementPropertySource.java   
/**
 * @param descriptors
 * @param propertyid
 */
private void enumerationDescriptor(Collection descriptors, PropertyID propertyid, String[] values) {
    // EClassifier type = getFeatureType(propertyid.getFeature());
    // Class enumer = type.getInstanceClass();
    String name = propertyid.getFeature().getName();
    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, name, values);
    pd.setCategory(Messages.getString("EObjectPropertySource.misc")); //$NON-NLS-1$
    descriptors.add(pd);

}
项目:seg.jUCMNav    文件:URNElementPropertySource.java   
private void componentRefDescriptor(Collection descriptors, EStructuralFeature attr, PropertyID propertyid) {
    Vector list = ParentFinder.getPossibleParents((URNmodelElement) getEditableValue());
    Collections.sort(list, new EObjectClassNameComparator());
    String[] values = new String[list.size() + 1];
    values[0] = Messages.getString("URNElementPropertySource.unbound"); //$NON-NLS-1$
    for (int i = 1; i < list.size() + 1; i++) {
        values[i] = EObjectClassNameComparator.getSortableElementName((IURNContainerRef) list.get(i - 1));
        if (values[i] == null)
            values[i] = Messages.getString("URNElementPropertySource.unnamed"); //$NON-NLS-1$
    }

    ComboBoxPropertyDescriptor pd = new ComboBoxPropertyDescriptor(propertyid, Messages.getString("URNElementPropertySource.parent"), values); //$NON-NLS-1$
    pd.setCategory(Messages.getString("EObjectPropertySource.info")); //$NON-NLS-1$
    descriptors.add(pd);
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompCompBind
 * 
 * Author: jkealey
 */
public void testReqCompCompBind2() {
    testReqCompCompBind1();
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    // create a property source on the small component ref
    ComponentRef cr = (ComponentRef) getMap().getContRefs().get(2);

    Vector v = getAttributeDescriptor(cr, "parent"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertEquals("Parent not option in property values", "ParentTest (14)", values[2]); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompCompUnbind
 * 
 * Author:
 */
public void testReqCompCompUnbind2() {
    testReqCompCompBind1();
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    // create a property source on the large component ref
    Vector v = getAttributeDescriptor(parent, "parent"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertTrue("No unbind option in list", Messages.getString("URNElementPropertySource.unbound").equals(values[0])); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompPathBind
 * 
 * Author: jkealey
 */
public void testReqCompPathBind2() {
    testReqCompPathBind1();
    PathNode node = (PathNode) getMap().getNodes().get(1);
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    Vector v = getAttributeDescriptor(node, "contRef"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertEquals("Parent not option in property values", "ParentTest (14)", values[2]); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:seg.jUCMNav    文件:ProgressTests.java   
/**
 * Test #2 for requirement ReqCompPathUnbind
 * 
 * Author:
 */
public void testReqCompPathUnbind2() {
    testReqCompPathUnbind1();
    PathNode node = (PathNode) getMap().getNodes().get(1);
    ComponentRef parent = (ComponentRef) getMap().getContRefs().get(1);
    ((Component) parent.getContDef()).setName("ParentTest"); //$NON-NLS-1$

    Vector v = getAttributeDescriptor(node, "contRef"); //$NON-NLS-1$
    String[] values = ((ComboBoxLabelProvider) ((ComboBoxPropertyDescriptor) v.get(0)).getLabelProvider()).getValues();
    assertTrue("No unbind option in list", Messages.getString("URNElementPropertySource.unbound").equals(values[0])); //$NON-NLS-1$ //$NON-NLS-2$
}
项目:Open_Source_ECOA_Toolset_AS5    文件:NodePropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    ArrayList<IPropertyDescriptor> properties = new ArrayList<IPropertyDescriptor>();
    if (node instanceof ComponentImplementationNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.COMP_IMPL_COMP_DEF, "Component Definition"));
    } else if (node instanceof ModuleTypeNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.MOD_TYPE_SUP_MOD, "Is Supervisory Module", NodeConstants.BOOL_OPTS));
    } else if (node instanceof ModuleImplementationNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Module Type"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.MOD_IMPL_LANG, "Language", NodeConstants.LANG_OPTS));
    } else if (node instanceof ModuleInstanceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.MOD_INST_IMPL_NAME, "Implementation Name", getImplementations()));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_REL_PRIORITY, "Priority"));
    } else if (node instanceof ModuleOperationNode) {
        ModuleOperationNode mNode = (ModuleOperationNode) node;
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_OP_TYPE, "Operation Type", mopTypes));
        if (mNode.getType() != null && mNode.getType().equalsIgnoreCase(Enums.ModuleOperationTypes.REQUEST_SENT.name())) {
            properties.add(new ComboBoxPropertyDescriptor(NodeConstants.MOD_OP_SYNC, "Is Synchronous", NodeConstants.BOOL_OPTS));
            properties.add(new TextPropertyDescriptor(NodeConstants.MOD_OP_TIMEOUT, "Timeout"));
        }
        if (mNode.getType() != null && (mNode.getType().equalsIgnoreCase(Enums.ModuleOperationTypes.DATA_READ.name()) || mNode.getType().equalsIgnoreCase(Enums.ModuleOperationTypes.DATA_WRITE.name()))) {
            properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_DATA_TYPE, "Data Type", getAllTypes()));
        }
    } else if (node instanceof ModuleOperationParameterNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", pTypes));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_DATA_TYPE, "Data Type", dtTypes));
    } else if (node instanceof TriggerInstanceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_REL_PRIORITY, "Relative Priority"));
    } else if (node instanceof DynamicTriggerInstanceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_REL_PRIORITY, "Relative Priority"));
    } else if (node instanceof ServiceNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new TextPropertyDescriptor(NodeConstants.SRVC_INTF_NAME, "Service Definition"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.SRVC_TYPE, "Service Provision", sTypes));
    } else if (node instanceof ServiceOperationNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_OP_TYPE, "Operation Type", sopTypes));
    } else if (node instanceof ModuleInstancePropertyNode) {
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_NAME, "Name"));
        properties.add(new ComboBoxPropertyDescriptor(NodeConstants.GENERIC_TYPE, "Type", sdtTypes));
        properties.add(new TextPropertyDescriptor(NodeConstants.GENERIC_VALUE, "Value"));
    }
    return properties.toArray(new IPropertyDescriptor[0]);
}
项目:ermasterr    文件:ERDiagramPropertySource.java   
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
    final List<String> dbList = DBManagerFactory.getAllDBList();

    return new IPropertyDescriptor[] {new ComboBoxPropertyDescriptor("database", ResourceString.getResourceString("label.database"), dbList.toArray(new String[dbList.size()]))};
}
项目:PDFReporter-Studio    文件:MSort.java   
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *            the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc,
        Map<String, Object> defaultsMap) {
    super.createPropertyDescriptors(desc, defaultsMap);

    ComboBoxPropertyDescriptor evaluationTimeD = new ComboBoxPropertyDescriptor(
            SortComponent.PROPERTY_EVALUATION_TIME,
            Messages.common_evaluation_time, EnumHelper.getEnumNames(
                    EvaluationTimeEnum.values(), NullEnum.NOTNULL));
    evaluationTimeD
            .setDescription(Messages.MGenericElement_evaluation_time_description);
    desc.add(evaluationTimeD);

    evaluationGroupNameD = new RComboBoxPropertyDescriptor(
            SortComponent.PROPERTY_EVALUATION_GROUP,
            Messages.MGenericElement_evaluation_group_name,
            new String[] { "" }); //$NON-NLS-2$
    evaluationGroupNameD
            .setDescription(Messages.MGenericElement_evaluation_group_name_description);
    desc.add(evaluationGroupNameD);

    ColorPropertyDescriptor color = new ColorPropertyDescriptor(
            SortComponent.PROPERTY_HANDLER_COLOR, "Handler Color",
            NullEnum.NULL);
    color.setDescription("Handler color");
    desc.add(color);

    ComboBoxPropertyDescriptor horizAlign = new ComboBoxPropertyDescriptor(
            SortComponent.PROPERTY_HANDLER_HORIZONTAL_ALIGN,
            "Handler Horizontal Alignement", EnumHelper.getEnumNames(
                    HorizontalAlignEnum.values(), NullEnum.NOTNULL));
    horizAlign.setDescription("Handler horizontal alignement");
    desc.add(horizAlign);

    ComboBoxPropertyDescriptor vertAlign = new ComboBoxPropertyDescriptor(
            SortComponent.PROPERTY_HANDLER_VERTICAL_ALIGN,
            "Handler Vertical Alignement", EnumHelper.getEnumNames(
                    VerticalAlignEnum.values(), NullEnum.NOTNULL));
    vertAlign.setDescription("Handler vertical alignement");
    desc.add(vertAlign);

    ComboBoxPropertyDescriptor sortFieldType = new ComboBoxPropertyDescriptor(
            SortComponent.PROPERTY_COLUMN_TYPE, "SortField Type",
            EnumHelper.getEnumNames(SortFieldTypeEnum.values(),
                    NullEnum.NOTNULL));
    sortFieldType.setDescription("SortField type");
    desc.add(sortFieldType);

    NTextPropertyDescriptor sortFieldName = new NTextPropertyDescriptor(
            SortComponent.PROPERTY_COLUMN_NAME, "SortField Name");
    sortFieldName.setDescription("SortField name");
    desc.add(sortFieldName);

    color.setCategory("Sort Properties");
    sortFieldType.setCategory("Sort Properties");
    sortFieldName.setCategory("Sort Properties");

    horizAlign.setCategory("Sort Properties");
    vertAlign.setCategory("Sort Properties");
    evaluationTimeD.setCategory("Sort Properties");
    evaluationGroupNameD.setCategory("Sort Properties");

    defaultsMap.put(SortComponent.PROPERTY_HANDLER_VERTICAL_ALIGN,
            VerticalAlignEnum.MIDDLE);
    defaultsMap.put(SortComponent.PROPERTY_HANDLER_HORIZONTAL_ALIGN,
            HorizontalAlignEnum.LEFT);
    defaultsMap.put(SortComponent.PROPERTY_EVALUATION_TIME,
            EvaluationTimeEnum.NOW);
    defaultsMap.put(SortComponent.PROPERTY_HANDLER_COLOR, null);
    defaultsMap.put(SortComponent.PROPERTY_COLUMN_TYPE,
            SortFieldTypeEnum.FIELD);

}