@Override public Object getValueFromState(RemoteValueState state, Object originalValue) { if (originalValue instanceof Font) { return FontHelper.toString((Font) originalValue); } return null; }
static Color createColor(String colorAsHexString) { if (ColorHelper.isColorSpec(colorAsHexString)) { int[] rgba = ColorHelper.fromHexString(colorAsHexString); return new Color(rgba[0], rgba[1], rgba[2], rgba[3]); } return null; }
@Override public Object getValueForState(RemoteValueState state, Object originalValue) { if (originalValue instanceof String && FontHelper.isFontSpec((String) originalValue)) { return FontHelper.fromString((String) originalValue); } return null; } };
private Dimension getDialogSize(Map<String, Object> context) { Dimension dialogSize = (Dimension) context .get(ModalDialogAction.DIALOG_SIZE); if (width != null && height != null) { dialogSize = new Dimension(width, height); } return dialogSize; }
private Font createFont(String fontString) { Font font = FontHelper.fromString(fontString); return font; }
/** * Sets the icon image URL of this workspace. Supported URL protocols include * : * <ul> * <li>all JVM supported protocols</li> * <li>the <b>jar:/</b> pseudo URL protocol</li> * <li>the <b>classpath:/</b> pseudo URL protocol</li> * </ul> * * @param iconImageURL * the iconImageURL to set. */ public void setIconImageURL(String iconImageURL) { if (icon == null) { icon = new Icon(); } icon.setIconImageURL(iconImageURL); }
private CellConnectorListener(int row, int col) { cell = new Coordinates(row, col); }
/** * Gets the icon image URL or null if no icon is set. * * @return the icon image URL or null if no icon is set. */ protected String getIconImageURL() { Icon icon = getIcon(); if (icon != null) { return icon.getIconImageURL(); } return null; }
private void configureAlignment(RLabel label, EHorizontalAlignment horizontalAlignment) { if (horizontalAlignment != null) { label.setHorizontalAlignment(horizontalAlignment.name()); } }
/** * Sets the icon image URL of this descriptor. Supported URL protocols include * : * <ul> * <li>all JVM supported protocols</li> * <li>the <b>jar:/</b> pseudo URL protocol</li> * <li>the <b>classpath:/</b> pseudo URL protocol</li> * </ul> * * @param iconImageURL * the iconImageURL to set. */ public void setIconImageURL(String iconImageURL) { if (icon == null) { icon = new Icon(); } icon.setIconImageURL(iconImageURL); }
private void configureAlignment(RNumericComponent numericField, EHorizontalAlignment horizontalAlignment) { if (horizontalAlignment != null) { numericField.setHorizontalAlignment(horizontalAlignment.name()); } }
private void configureAlignment(RTextField textField, EHorizontalAlignment horizontalAlignment) { if (horizontalAlignment != null) { textField.setHorizontalAlignment(horizontalAlignment.name()); } }
private void configureAlignment(RImageComponent image, EHorizontalAlignment horizontalAlignment) { if (horizontalAlignment != null) { image.setHorizontalAlignment(horizontalAlignment.name()); } }