Example usage for com.google.gwt.user.client.ui UIObject setHeight

List of usage examples for com.google.gwt.user.client.ui UIObject setHeight

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui UIObject setHeight.

Prototype

public void setHeight(String height) 

Source Link

Document

Sets the object's height.

Usage

From source file:ca.upei.ic.timetable.client.UIUtils.java

License:Apache License

public static void objectSetPixelSizeIntelligently(UIObject object, int width, int height) {

    if (width >= 0 && height >= 0) {
        object.setPixelSize(width, height);
    } else if (width >= 0 && height < 0) {
        object.setWidth(Integer.toString(width) + "px");
    } else if (width < 0 && height >= 0) {
        object.setHeight(Integer.toString(height) + "px");
    }/*from  ww  w . ja  v  a2 s  . c  om*/
}

From source file:com.qualogy.qafe.gwt.client.ui.renderer.RendererHelper.java

License:Apache License

public static void addDimension(ComponentGVO vo, UIObject ui, String uuid, String parent) {
    // Test if the component or the object are null
    if (vo != null && ui != null) {

        // The width of the component
        String strVoWidth = vo.getWidth();

        // The height of the component
        String strVoHeight = vo.getHeight();

        // Test if the width is null or the length <= 0
        if (strVoWidth != null && strVoWidth.length() > 0) {

            // Test if the width is negative
            if (strVoWidth.indexOf("-") != -1) {
                ClientApplicationContext.getInstance().log("The width should not be negative:" + strVoWidth);
            } else {
                // Standard Mode (!DOCTYPE):
                // CSS requires most values to have a unit. If such a value doesnt have a unit its ignored, so default pixels
                if (strVoWidth.matches("\\d+")) {
                    strVoWidth += Unit.PX;
                }/*from w w  w .jav a2  s .c  o m*/
                ui.setWidth(strVoWidth);
            }
        }

        // Test if the height is null or the length <= 0
        if (strVoHeight != null && strVoHeight.length() > 0) {

            // Test if the height is negative
            if (strVoHeight.indexOf("-") != -1) {
                ClientApplicationContext.getInstance().log("The height should not be negative:" + strVoHeight);
            } else {
                // Standard Mode (!DOCTYPE):
                // CSS requires most values to have a unit. If such a value doesnt have a unit its ignored, so default pixels
                if (strVoHeight.matches("\\d+")) {
                    strVoHeight += Unit.PX;
                }
                ui.setHeight(strVoHeight);
            }
        }

        if (strVoWidth != null && strVoHeight != null && strVoWidth.equals("0") && strVoHeight.equals("0")) {
            ui.setVisible(false);
        }
    }

}

From source file:com.qualogy.qafe.gwt.client.ui.renderer.TextFieldRenderer.java

License:Apache License

public UIObject render(ComponentGVO component, String uuid, String parent, String context) {
    UIObject uiObject = null;
    if (component != null && component instanceof TextFieldGVO) {
        final TextFieldGVO gvo = (TextFieldGVO) component;
        final ComponentGVO finalComponentGVO = component;
        final String finalUuid = uuid;
        final String finalParent = parent;
        if (gvo.getDisplayname() == null || gvo.getDisplayname().length() == 0) {
            if (gvo.getType() != null) {
                if (TextFieldGVO.TYPE_DATE.equals(gvo.getType())) {
                    if (gvo.getMenu() != null) {
                        uiObject = new QDatePicker(gvo.getFormat()) {
                            @Override
                            public void onBrowserEvent(Event event) {
                                if (event.getTypeInt() == Event.ONCONTEXTMENU) {
                                    DOM.eventPreventDefault(event);
                                    applyContextMenu(event, finalComponentGVO, finalUuid, finalParent);
                                }/*from w ww.j  ava 2 s .c o m*/
                                super.onBrowserEvent(event);
                            }

                            @Override
                            protected void setElement(Element elem) {
                                super.setElement(elem);
                                sinkEvents(Event.ONCONTEXTMENU);
                            }
                        };
                    } else {
                        uiObject = new QDatePicker(gvo.getFormat());
                    }
                    uiObject.setHeight(TextFieldGVO.DEFAULT_HEIGHT);

                    RendererHelper.fillIn(component, ((QDatePicker) uiObject).getTextBox(), uiObject, uuid,
                            parent, context);
                    RendererHelper.addEvents(component, uiObject, uuid);

                } else if (TextFieldGVO.TYPE_SPINNER.equals(gvo.getType())) {
                    String height = TextFieldGVO.DEFAULT_HEIGHT;
                    String width = TextFieldGVO.DEFAULT_WIDTH;
                    int minValue = TextFieldGVO.DEFAULT_MINIMUM;
                    int maxValue = TextFieldGVO.DEFAULT_MAXIMUM;
                    if (gvo.getHeight() != null)
                        height = gvo.getHeight();
                    if (gvo.getWidth() != null)
                        width = gvo.getWidth();
                    if (gvo.getMinValue() != null)
                        minValue = Integer.parseInt(gvo.getMinValue());
                    if (gvo.getMaxValue() != null)
                        maxValue = Integer.parseInt(gvo.getMaxValue());
                    long initialValue;
                    if (gvo.getValue() != null) {
                        initialValue = Long.parseLong(gvo.getValue());
                        if (initialValue < (long) minValue || initialValue > (long) maxValue) {
                            initialValue = minValue;
                        }
                    } else {
                        initialValue = minValue;
                    }
                    if (gvo.getMenu() != null) {
                        uiObject = new QValueSpinner(initialValue, minValue, maxValue) {
                            @Override
                            public void onBrowserEvent(Event event) {
                                if (event.getTypeInt() == Event.ONCONTEXTMENU) {
                                    DOM.eventPreventDefault(event);
                                    applyContextMenu(event, finalComponentGVO, finalUuid, finalParent);
                                }
                                super.onBrowserEvent(event);
                            }

                            @Override
                            protected void setElement(Element elem) {
                                super.setElement(elem);
                                sinkEvents(Event.ONCONTEXTMENU);
                            }
                        };
                    } else {
                        uiObject = new QValueSpinner(initialValue, minValue, maxValue);
                    }
                    TextBox spinnerTextBox = ((QValueSpinner) uiObject).getTextBox();
                    RendererHelper.setStyleForElement(spinnerTextBox.getElement(), "width", width);
                    RendererHelper.setStyleForElement(spinnerTextBox.getElement(), "height", height);
                    //spinnerTextBox.setStylePrimaryName(gvo.getStyleClassName());
                    //spinnerTextBox.setStyleName(gvo.getStyleClass());
                    RendererHelper.fillIn(component, spinnerTextBox, uuid, parent, context);
                } else if (gvo.getSuggest()) {
                    QSuggestOracle oracle = new QSuggestOracle();
                    QSuggestBox suggest = null;
                    if (gvo.getMenu() != null) {
                        suggest = new QSuggestBox(oracle) {
                            @Override
                            public void onBrowserEvent(Event event) {
                                if (event.getTypeInt() == Event.ONCONTEXTMENU) {
                                    DOM.eventPreventDefault(event);
                                    applyContextMenu(event, finalComponentGVO, finalUuid, finalParent);
                                }
                                super.onBrowserEvent(event);
                            }

                            @Override
                            protected void setElement(Element elem) {
                                super.setElement(elem);
                                sinkEvents(Event.ONCONTEXTMENU);
                            }
                        };
                    } else {
                        suggest = new QSuggestBox(oracle);
                    }
                    suggest.setSuggestCharactersLength(gvo.getSuggestCharacters());

                    uiObject = suggest;
                    //                     RendererHelper.fillIn(component, ((QSuggestBox)uiObject).getTextBox(), uuid, parent, context);
                    RendererHelper.fillIn(component, uiObject, uuid, parent, context);
                } else {
                    if (gvo.getMenu() != null) {
                        uiObject = new QTextField(gvo) {
                            @Override
                            public void onBrowserEvent(Event event) {
                                if (event.getTypeInt() == Event.ONCONTEXTMENU) {
                                    DOM.eventPreventDefault(event);
                                    applyContextMenu(event, finalComponentGVO, finalUuid, finalParent);
                                }
                                super.onBrowserEvent(event);
                            }

                            @Override
                            protected void setElement(Element elem) {
                                super.setElement(elem);
                                sinkEvents(Event.ONCONTEXTMENU);
                            }
                        };
                    } else {
                        uiObject = new QTextField(gvo);
                    }
                    RendererHelper.fillIn(component, uiObject, uuid, parent, context);
                }
            }
        } else {
            if (gvo.getMenu() != null) {
                uiObject = new LabeledTextFieldWidget(gvo, gvo.getDisplayname(), gvo.getOrientation(),
                        gvo.getType(), gvo.getFormat()) {
                    @Override
                    public void onBrowserEvent(Event event) {
                        if (event.getTypeInt() == Event.ONCONTEXTMENU) {
                            DOM.eventPreventDefault(event);
                            applyContextMenu(event, finalComponentGVO, finalUuid, finalParent);
                        }
                        super.onBrowserEvent(event);
                    }

                    @Override
                    protected void setElement(Element elem) {
                        super.setElement(elem);
                        sinkEvents(Event.ONCONTEXTMENU);
                    }
                };
            } else {
                uiObject = new LabeledTextFieldWidget(gvo, gvo.getDisplayname(), gvo.getOrientation(),
                        gvo.getType(), gvo.getFormat());
            }
            UIObject labeledTextBox = ((LabeledTextFieldWidget) uiObject).getTextbox();
            UIObject actualComp = labeledTextBox;
            UIObject labelOnComp = ((LabeledTextFieldWidget) uiObject).getLabel();
            if (labeledTextBox instanceof QDatePicker) {
                actualComp = ((QDatePicker) labeledTextBox).getTextBox();
                RendererHelper.addEvents(component, labeledTextBox, uuid);
            } else if (labeledTextBox instanceof QValueSpinner) {
                actualComp = ((QValueSpinner) labeledTextBox).getTextBox();
            } else if (labeledTextBox instanceof QSuggestBox) {
                actualComp = ((QSuggestBox) labeledTextBox).getTextBox();
            }
            RendererHelper.fillIn(component, actualComp, uuid, parent, context);
        }

        // for checking based on type introduces this.
        if (gvo.getRegExp() != null) {
            DOM.setElementAttribute(RendererHelper.getElement(uiObject), TextFieldGVO.REGEXPTYPE,
                    gvo.getType());
        }

        registerDataChange(gvo, uiObject);

        handleTypeAttribute(uiObject, gvo.getRegExp(), gvo.getValidationTitle(), gvo.getValidationMessage());
        handleEditableAttribute(gvo, uiObject);
        handleMinLengthAttribute(gvo, uiObject);
        handleMaxLengthAttribute(gvo, uiObject);
        handleValueAttribute(gvo, uiObject);
        handleRequiredValidationMessageAttribute(gvo, uiObject);

        RendererHelper.handleRequiredAttribute(gvo, uiObject);
    }
    return uiObject;
}

From source file:com.qualogy.qafe.gwt.client.vo.functions.execute.SetPropertyExecute.java

License:Apache License

private void processProperty(UIObject uiObject, BuiltInComponentGVO builtInComponentGVO,
        SetPropertyGVO setProperty) {//ww w . jav  a2 s.c o m
    if (QAMLConstants.PROPERTY_ENABLED.equals(setProperty.getProperty())
            || QAMLConstants.PROPERTY_DISABLED.equals(setProperty.getProperty())) {
        boolean value = Boolean.valueOf(setProperty.getValue()).booleanValue();
        if (QAMLConstants.PROPERTY_DISABLED.equals(setProperty.getProperty())) {
            value = !value;
        }
        if (uiObject instanceof HasEnabled) {
            HasEnabled hasEnabled = (HasEnabled) uiObject;
            hasEnabled.setEnabled(value);
        } else if (uiObject instanceof HasWidgets) {
            SetMaskHelper.setMaskEnable(uiObject.getElement().getAttribute(QAMLConstants.PROPERTY_ID), value,
                    true);
            DOM.setElementPropertyBoolean(uiObject.getElement(), QAMLConstants.PROPERTY_DISABLED, !value);
        } else if (uiObject instanceof QSuggestBox) {
            QSuggestBox suggestField = (QSuggestBox) uiObject;
            suggestField.getTextBox().setEnabled(value);
        } else if (uiObject instanceof SpreadsheetCell) {
            SpreadsheetCell cell = (SpreadsheetCell) uiObject;
            cell.setEditable(value);
        }
    } else if (QAMLConstants.PROPERTY_EDITABLE.equals(setProperty.getProperty())) {
        boolean editable = Boolean.valueOf(setProperty.getValue()).booleanValue();
        HasEditable hasEditable = null;
        if (uiObject instanceof HasEditable) {
            hasEditable = (HasEditable) uiObject;
        } else if (uiObject instanceof TextBoxBase) {
            TextBoxBase textboxBase = (TextBoxBase) uiObject;
            if (textboxBase.getParent() instanceof HasEditable) {
                hasEditable = (HasEditable) textboxBase.getParent();
            } else {
                textboxBase.setReadOnly(!editable);
            }
        }
        if (hasEditable != null) {
            hasEditable.setEditable(editable);
        }
    } else if (QAMLConstants.PROPERTY_VISIBLE.equals(setProperty.getProperty())) {
        boolean value = Boolean.valueOf(setProperty.getValue()).booleanValue();
        if (uiObject instanceof HasVisible) {
            ((HasVisible) uiObject).processVisible(value);
        } else if (uiObject instanceof HasDataGridMethods) {
            HasDataGridMethods hasDataGridMethods = (HasDataGridMethods) uiObject;
            boolean resolved = false;
            String uuid = builtInComponentGVO.getComponentIdUUID();
            if (uuid != null) {
                boolean containsColumn = uuid.contains(".");
                if (containsColumn) {
                    String columnId = uuid.replaceFirst(".+\\.", "").replaceFirst("\\|.+", "");
                    hasDataGridMethods.setColumnVisible(columnId, value);
                    resolved = true;
                }
            }
            if (!resolved) {
                uiObject.setVisible(value);
                hasDataGridMethods.redraw();
            }
        } else {
            uiObject.setVisible(value);
            if (uiObject instanceof Panel) {
                Panel p = (Panel) uiObject;
                Widget parent = p.getParent();
                if (parent != null && parent instanceof DeckPanel) {
                    DeckPanel deckPanel = (DeckPanel) parent;
                    int widgetIndex = deckPanel.getWidgetIndex(p);
                    if (widgetIndex != -1) {
                        if (deckPanel.getParent() != null && deckPanel.getParent().getParent() != null
                                && deckPanel.getParent().getParent() instanceof TabPanel) {
                            TabPanel tabs = ((TabPanel) (deckPanel.getParent().getParent()));
                            TabPanelRenderer.setTabVisibility(tabs, widgetIndex, value, uiObject);
                        }
                    }
                }
            }
        }
    } else if (QAMLConstants.PROPERTY_HEIGHT.equals(setProperty.getProperty())) {
        try {
            String height = setProperty.getValue();
            if (!QAMLUtil.containsUnitIdentifier(height)) {
                height += QAMLUtil.DEFAULT_UNIT;
            }
            uiObject.setHeight(height);
        } catch (Exception e) {
            ClientApplicationContext.getInstance().log("Set Property on height failed",
                    "Please check value of height (" + setProperty.getValue() + ")", true);
        }
    } else if (QAMLConstants.PROPERTY_WIDTH.equals(setProperty.getProperty())) {
        try {
            String width = setProperty.getValue();
            if (!QAMLUtil.containsUnitIdentifier(width)) {
                width += QAMLUtil.DEFAULT_UNIT;
            }
            uiObject.setWidth(width);
        } catch (Exception e) {
            ClientApplicationContext.getInstance().log("Set Property on width failed",
                    "Please check value of width (" + setProperty.getValue() + ")", true);
        }
    } else if (QAMLConstants.PROPERTY_TOOLTIP.equals(setProperty.getProperty())) {
        uiObject.setTitle(setProperty.getValue());
    } else if (QAMLConstants.PROPERTY_TITLE.equals(setProperty.getProperty())) {
        if (uiObject instanceof CaptionPanel) {
            CaptionPanel p = (CaptionPanel) uiObject;
            p.setCaptionText(setProperty.getValue());
        }
    } else if (QAMLConstants.PROPERTY_DISPLAYNAME.equals(setProperty.getProperty())) {
        if (uiObject instanceof HasDataGridMethods) {
            HasDataGridMethods hasDataGridMethods = (HasDataGridMethods) uiObject;
            String uuid = builtInComponentGVO.getComponentIdUUID();
            if (uuid != null) {
                boolean containsColumn = uuid.contains(".");
                if (containsColumn) {
                    String columnId = uuid.replaceFirst(".+\\.", "").replaceFirst("\\|.+", "");
                    String value = setProperty.getValue();
                    hasDataGridMethods.setColumnLabel(columnId, value);
                }
            }
        } else if (uiObject instanceof PushButton) {
            ((PushButton) uiObject).getUpFace().setText(setProperty.getValue());
            ((PushButton) uiObject).getDownFace().setText(setProperty.getValue());
        } else if (uiObject instanceof HasText) {
            HasText t = (HasText) uiObject;
            t.setText(setProperty.getValue());
        } else if (uiObject instanceof VerticalPanel) {
            VerticalPanel vp = (VerticalPanel) uiObject;
            Widget tabPanelWidget = vp.getParent().getParent().getParent();
            if (tabPanelWidget instanceof TabPanel) {
                TabPanel tp = (TabPanel) tabPanelWidget;
                TabBar tb = tp.getTabBar();
                int tabCount = tp.getWidgetCount();
                for (int i = 0; i < tabCount; i++) {
                    Widget w = tp.getWidget(i);
                    if (w == vp) {
                        tb.setTabText(i, setProperty.getValue());
                    }
                }
            }
        } else if (uiObject instanceof QWindowPanel) {
            QWindowPanel p = (QWindowPanel) uiObject;
            p.setCaption(setProperty.getValue());
        }
    } else if (QAMLConstants.PROPERTY_SELECTED_ROW.equals(setProperty.getProperty())) {
        if (uiObject instanceof HasDataGridMethods) {
            HasDataGridMethods hasDataGridMethods = (HasDataGridMethods) uiObject;
            try {
                int rowNr = Integer.parseInt(setProperty.getValue());
                hasDataGridMethods.selectRow(rowNr);
            } catch (Exception e) {
                ClientApplicationContext.getInstance()
                        .log("Set property on the datagrid selected row: the value (" + setProperty.getValue()
                                + ") cannot be translated into an integer", e);
            }
        }
    } else if (QAMLConstants.PROPERTY_SELECTED.equals(setProperty.getProperty())) {
        if (uiObject instanceof CheckBox) {
            boolean value = Boolean.valueOf(setProperty.getValue()).booleanValue();
            ((CheckBox) (uiObject)).setValue(value);
        } else if (uiObject instanceof ListBox) {
            ListBox listBox = (ListBox) uiObject;
            int size = listBox.getItemCount();
            boolean selected = false;
            for (int i = 0; i < size && !selected; i++) {
                if (listBox.getValue(i).equals(setProperty.getValue())) {
                    selected = true;
                    listBox.setSelectedIndex(i);
                }
            }
        }
    } else if (QAMLConstants.PROPERTY_CURRENT_PAGE.equals(setProperty.getProperty())) {
        if (uiObject instanceof HasDataGridMethods) {
            HasDataGridMethods dataGridSortableTable = (HasDataGridMethods) uiObject;
            try {
                if (setProperty.getValue() != null) {
                    dataGridSortableTable.setCurrentPage(Integer.parseInt(setProperty.getValue()));
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    } else if (QAMLConstants.PROPERTY_PAGESIZE.equals(setProperty.getProperty())) {
        if (uiObject instanceof HasDataGridMethods) {
            HasDataGridMethods dataGridSortableTable = (HasDataGridMethods) uiObject;
            try {
                if (setProperty.getValue() != null) {
                    dataGridSortableTable.setPageSize(Integer.parseInt(setProperty.getValue()));
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    } else if (QAMLConstants.PROPERTY_MAX_TICKS.equals(setProperty.getProperty())) {
        if (uiObject instanceof QSliderBar) {
            QSliderBar slider = (QSliderBar) uiObject;
            slider.setMaxValue(Double.valueOf(setProperty.getValue()));
        }
    } else if (QAMLConstants.PROPERTY_MIN_TICKS.equals(setProperty.getProperty())) {
        if (uiObject instanceof QSliderBar) {
            QSliderBar slider = (QSliderBar) uiObject;
            slider.setMinValue(Double.valueOf(setProperty.getValue()));
        }
    } else if (QAMLConstants.PROPERTY_TICKSIZE.equals(setProperty.getProperty())) {
        if (uiObject instanceof QSliderBar) {
            QSliderBar slider = (QSliderBar) uiObject;
            slider.setStepSize(Integer.valueOf(setProperty.getValue()));
        }
    } else if (QAMLConstants.PROPERTY_TICK_LABELS.equals(setProperty.getProperty())) {
        if (uiObject instanceof QSliderBar) {
            QSliderBar slider = (QSliderBar) uiObject;
            slider.setTickLabels(Integer.valueOf(setProperty.getValue()));
        }
    }
}

From source file:com.qualogy.qafe.gwt.client.vo.handlers.SetPropertyHandler.java

License:Apache License

private void handleHeight(UIObject uiObject, String value) {
    try {//from   www  . j  a  v a  2s  .  c  o  m
        // uiObject.setWidth expects a css unit, so if no unit is available, we set it to the default
        // if no unit is specified, uiObject.setWidth() generates invalid css.
        String height = value;
        if (!QAMLUtil.containsUnitIdentifier(height)) {
            height += QAMLUtil.DEFAULT_UNIT;
        }
        uiObject.setHeight(height);
    } catch (Exception e) {
        log("Set Property on height failed", "please check value of height (" + value + ")", true);
    }
}

From source file:com.qualogy.qafe.mgwt.client.ui.renderer.AbstractComponentRenderer.java

License:Apache License

protected void initSize(UIObject widget, String width, String height, String uuid, String parent,
        String context) {/*from w w w.  j av  a2 s  .  co m*/
    if (widget == null) {
        return;
    }
    if (!QAMLUtil.isEmpty(width)) {
        if (!width.startsWith("-")) {
            // Width is not negative
            if (QAMLUtil.isNumber(width)) {
                width = width + QAMLConstants.UNIT;
            }
            widget.setWidth(width);
        }
    }
    if (!QAMLUtil.isEmpty(height)) {
        if (!height.startsWith("-")) {
            // Height is not negative
            if (QAMLUtil.isNumber(height)) {
                height = height + QAMLConstants.UNIT;
            }
            widget.setHeight(height);
        }
    }
    if ("0".equals(width) && "0".equals(height)) {
        widget.setVisible(false);
    }
}

From source file:com.qualogy.qafe.mgwt.client.ui.renderer.RendererHelper.java

License:Apache License

public static void addDimension(ComponentGVO vo, UIObject ui, String uuid, String parent) {
    // Test if the component or the object are null
    if (vo != null && ui != null) {

        // The width of the component
        String strVoWidth = vo.getWidth();

        // The height of the component
        String strVoHeight = vo.getHeight();

        // Test if the width is null or the length <= 0
        if (strVoWidth != null && strVoWidth.length() > 0) {

            // Test if the width is negative
            if (strVoWidth.indexOf("-") != -1) {
                ClientApplicationContext.getInstance().log("The width should not be negative:" + strVoWidth);
            } else {
                ui.setWidth(strVoWidth);
            }//from  www .ja  v a 2s  .c  om
        }

        // Test if the height is null or the length <= 0
        if (strVoHeight != null && strVoHeight.length() > 0) {

            // Test if the height is negative
            if (strVoHeight.indexOf("-") != -1) {
                ClientApplicationContext.getInstance().log("The height should not be negative:" + strVoHeight);
            } else {
                ui.setHeight(strVoHeight);
            }
        }

        if (strVoWidth != null && strVoHeight != null && strVoWidth.equals("0") && strVoHeight.equals("0")) {
            ui.setVisible(false);
        }
    }

}

From source file:com.qualogy.qafe.mgwt.client.vo.functions.execute.SetPropertyExecute.java

License:Apache License

private void setProperty(SetPropertyGVO setPropertyGVO, UIObject widget) {
    if (widget == null) {
        return;/*from  w  w  w .j  a  v  a2s  . co  m*/
    }
    String propertyName = setPropertyGVO.getProperty();
    if (QAMLConstants.PROPERTY_VISIBLE.equals(propertyName)) {
        if (widget instanceof HasVisibility) {
            boolean visible = Boolean.valueOf(setPropertyGVO.getValue());
            HasVisibility hasVisibility = (HasVisibility) widget;
            hasVisibility.setVisible(visible);
        }
    } else if (QAMLConstants.PROPERTY_EDITABLE.equals(propertyName)) {
        if (widget instanceof IsEditable) {
            boolean editable = Boolean.valueOf(setPropertyGVO.getValue());
            IsEditable isEditable = (IsEditable) widget;
            isEditable.setEditable(editable);
        }
    } else if (QAMLConstants.PROPERTY_ENABLED.equals(propertyName)) {
        if (widget instanceof HasEnabled) {
            boolean enabled = Boolean.valueOf(setPropertyGVO.getValue());
            HasEnabled hasEnabled = (HasEnabled) widget;
            hasEnabled.setEnabled(enabled);
        }
    } else if (QAMLConstants.PROPERTY_HEIGHT.equals(propertyName)) {
        String height = setPropertyGVO.getValue();
        widget.setHeight(height);
    } else if (QAMLConstants.PROPERTY_WIDTH.equals(propertyName)) {
        String width = setPropertyGVO.getValue();
        widget.setWidth(width);
    } else if (QAMLConstants.PROPERTY_DISPLAYNAME.equals(propertyName)) {
        if (widget instanceof HasDisplayname) {
            HasDisplayname hasDisplayname = (HasDisplayname) widget;
            hasDisplayname.setDisplayname(setPropertyGVO.getValue());
        }
    } else if (QAMLConstants.PROPERTY_SELECTED.equals(propertyName)) {
        if (widget instanceof HasSelection) {
            HasSelection hasSelection = (HasSelection) widget;
            hasSelection.setSelected(setPropertyGVO.getValue());
        }
    } else if (QAMLConstants.PROPERTY_SELECTED_ROW.equals(propertyName)) {
        if (widget instanceof HasIndexSelection) {
            int selectedIndex = QAMLUtil.toInteger(setPropertyGVO.getValue());
            HasIndexSelection hasIndexSelection = (HasIndexSelection) widget;
            hasIndexSelection.setSelectedIndex(selectedIndex);
        }
    } else if (QAMLConstants.PROPERTY_CURRENT_PAGE.equals(propertyName)) {
        if (widget instanceof HasPaging) {
            int currentPage = QAMLUtil.toInteger(setPropertyGVO.getValue());
            HasPaging hasPaging = (HasPaging) widget;
            hasPaging.setCurrentPage(currentPage);
        }
    } else if (QAMLConstants.PROPERTY_PAGESIZE.equals(propertyName)) {
        if (widget instanceof HasPaging) {
            int pageSize = QAMLUtil.toInteger(setPropertyGVO.getValue());
            HasPaging hasPaging = (HasPaging) widget;
            hasPaging.setPageSize(pageSize);
        }
    } else if (QAMLConstants.PROPERTY_MIN_TICKS.equals(propertyName)) {
        if (widget instanceof HasRange) {
            int minValue = QAMLUtil.toInteger(setPropertyGVO.getValue());
            HasRange hasRange = (HasRange) widget;
            hasRange.setMinValue(minValue);
        }
    } else if (QAMLConstants.PROPERTY_MAX_TICKS.equals(propertyName)) {
        if (widget instanceof HasRange) {
            int maxValue = QAMLUtil.toInteger(setPropertyGVO.getValue());
            HasRange hasRange = (HasRange) widget;
            hasRange.setMaxValue(maxValue);
        }
    } else if (QAMLConstants.PROPERTY_TICKSIZE.equals(propertyName)) {
        if (widget instanceof HasRange) {
            int stepValue = QAMLUtil.toInteger(setPropertyGVO.getValue());
            HasRange hasRange = (HasRange) widget;
            hasRange.setStepValue(stepValue);
        }
    } else if (QAMLConstants.PROPERTY_TICK_LABELS.equals(propertyName)) {
        // Do nothing
    }
}