protected void propertyChange(String key) { ButtonFigure figure = (ButtonFigure) getFigure(); Button model = (Button) getModel(); if (key.equals(FrameNode.PROPERTY_HALIGN)) { figure.setHAlign(model.getHAlign()); } else if (key.equals(FrameNode.PROPERTY_VALIGN)) { figure.setVAlign(model.getVAlign()); } else if (key.equals(FrameNode.PROPERTY_TEXTDIRECTION)) { figure.setTextDirection(model.getTextDirection()); } }
@Override protected IFigure createFigure() { Button button = (Button) getModel(); ButtonFigure figure = new ButtonFigure(button.getParent().getScreen()); this.figure = figure; figure.setTextDirection(button.getTextDirection()); figure.setHAlign(button.getHAlign()); figure.setVAlign(button.getVAlign()); if (button.getNormalFGColor().equals(FrameConst.DEFAULT_COLOR)) figure.setForegroundColor(ColorConstants.black); else figure.setForegroundColor(OspResourceManager.FormatRGB(button.getNormalFGColor())); // figure.setBackgroundColor(button.getEditorBgColor()); File image = button.getNormalBitmapPath(); figure.setNormalBitmap(image); image = button.getNormalBGBitmapPath(); figure.setNormalBGBitmap(image); figure.setPointX(button.getNormalBitmapX()); figure.setPointY(button.getNormalBitmapY()); return figure; }