Package com.volantis.mcs.eclipse.common

Examples of com.volantis.mcs.eclipse.common.ControlType


     * @param controlDetails The details of the control to create.
     */
    private void createAttributeControl(
            ControlDetails controlDetails) {
        // work out what the control type is.
        ControlType controlType =
                    controlDetails.attributesDetails.getAttributeControlType(
                                controlDetails.attribute);
        // We only add a label if the control is not a CheckBox. CheckBox
        // controls add the label to the right of the control.
        if (ControlType.CHECK_BOX != controlType) {
View Full Code Here


     */
    private String createMethodName(ControlDetails controlDetails) {
        StringBuffer methodName = new StringBuffer("create");
        String attribute = controlDetails.attribute;

        ControlType controlType = controlDetails.attributesDetails.
                getAttributeControlType(attribute);

        if (controlType != null) {
            // If we have a control type use it to create a more generic
            // method name.
View Full Code Here

     *
     * @param controlDetails the control details instance.
     */
    private void createAttributeLabel(ControlDetails controlDetails) {

        ControlType type = controlDetails.attributesDetails.
                getAttributeControlType(controlDetails.attribute);
        if (type != ControlType.CHECK_BOX) {
            Label label = new Label(controlDetails.attributesComposite, SWT.NONE);
            label.setText(getResourceString(controlDetails.attribute));
            label.setData(AttributesComposite.LABEL_KEY, controlDetails.attribute);
View Full Code Here

    }


    // javadoc inherited
    public ControlType getAttributeControlType(String attribute) {
        ControlType result = null;
        AttributeDetails details = findAttribute(attribute);
        if (details != null) {
            result = ControlType.getControlType(details.type);
        }
        return result;
View Full Code Here

     */
    public void testGetAttributeControlTypePositive() {
        PolicyAttributesDetails attributesDetails =
                new PolicyAttributesDetails("audioComponent", true);

        ControlType controlType =
                attributesDetails.getAttributeControlType("encoding");

        assertNotNull(controlType);
        assertEquals("Expected ControlType.READ_ONLY_COMBO_VIEWER",
                ControlType.READ_ONLY_COMBO_VIEWER, controlType);
View Full Code Here

     */
    public void testGetAttributeControlTypeNegative() {
        PolicyAttributesDetails attributesDetails =
                new PolicyAttributesDetails("audioComponent", false);

        ControlType controlType =
                attributesDetails.getAttributeControlType("encoding");

        assertNull(controlType);
    }
View Full Code Here

                1,
                details.getAttributes().length);
        assertEquals("Value should match",
                attributes[0],
                details.getAttributes()[0]);
        ControlType type = details.getAttributeControlType(attributes[0]);
        assertNotNull("Type shouldn't be null", type);
        assertEquals("Value should match", ControlType.TEXT, type);

        attributes = new String[] { "name", "attribute" };
        details.addAttributes(attributes[1], "UNKNOWN", null, null);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.common.ControlType

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.