@Override public void setProperty(SComponent comp, String name, String value) { if ("BACKGROUND".equals(name)) comp.setBackground(Color.decode(value)); else if ("FOREGROUND".equals(name)) comp.setForeground(Color.decode(value)); else if ("FONT".equals(name)) comp.setFont(TemplateUtil.parseFont(value)); else if ("TABINDEX".equals(name)) comp.setFocusTraversalIndex(Integer.parseInt(value)); else if ("STYLE".equals(name)) { PropertyValueConverter valueConverter = getValueConverter(CSSAttributeSet.class); comp.setAttributes(SComponent.SELECTOR_ALL, (CSSAttributeSet) valueConverter.convertPropertyValue(value, CSSAttributeSet.class)); } else if ("CLASS".equals(name)) { comp.setStyle(value); } else if ("ALIGN".equals(name)) { comp.setHorizontalAlignment(TemplateUtil.parseAlignment(value)); } else if ("VALIGN".equals(name)) { comp.setVerticalAlignment(TemplateUtil.parseAlignment(value)); } else { super.setProperty(comp, name, value); } // end of else }
IView<SComponent> leftTopView = createView(viewDescriptor .getLeftTopViewDescriptor(), actionHandler, locale); leftTopView.getPeer().setHorizontalAlignment(SConstants.LEFT_ALIGN); leftTopView.getPeer().setVerticalAlignment(SConstants.TOP_ALIGN); switch (viewDescriptor.getOrientation()) { IView<SComponent> rightBottomView = createView(viewDescriptor .getRightBottomViewDescriptor(), actionHandler, locale); rightBottomView.getPeer().setHorizontalAlignment(SConstants.LEFT_ALIGN); rightBottomView.getPeer().setVerticalAlignment(SConstants.TOP_ALIGN); int gridx = 0;
IView<SComponent> leftTopView = createView( viewDescriptor.getLeftTopViewDescriptor(), actionHandler, locale); leftTopView.getPeer().setHorizontalAlignment(SConstants.LEFT_ALIGN); leftTopView.getPeer().setVerticalAlignment(SConstants.TOP_ALIGN); switch (viewDescriptor.getOrientation()) { IView<SComponent> rightBottomView = createView( viewDescriptor.getRightBottomViewDescriptor(), actionHandler, locale); rightBottomView.getPeer().setHorizontalAlignment(SConstants.LEFT_ALIGN); rightBottomView.getPeer().setVerticalAlignment(SConstants.TOP_ALIGN); int gridx = 0;
workspaceNavigator.getPeer().setHorizontalAlignment( SConstants.LEFT_ALIGN); workspaceNavigator.getPeer().setVerticalAlignment(SConstants.TOP_ALIGN); GridBagConstraints.BOTH, insets, 0, 0)); moduleAreaView.getPeer().setHorizontalAlignment(SConstants.LEFT_ALIGN); moduleAreaView.getPeer().setVerticalAlignment(SConstants.TOP_ALIGN); int gridx = 1;