/** * Constructor. Creates an instance of text. Default no-wrap text wrapping. * * @param text */ public Text(String text) { super(ShapeType.TEXT); final LienzoCore globals = LienzoCore.get(); if (null == text) { text = ""; } setText(text).setFontFamily(globals.getDefaultFontFamily()).setFontStyle(globals.getDefaultFontStyle()).setFontSize(globals.getDefaultFontSize()); }
public final void setCorrectionOffset(double offset) { if (offset < 0) { offset = LienzoCore.get().getDefaultConnectorOffset(); } put(Attribute.CORRECTION_OFFSET.getProperty(), offset); }
@Override public IFactory<?> getFactory() { return LienzoCore.get().getFactory(m_type); }
/** * Creates a Picture from a URL. * The following attributes are defaulted: * <ul> * <li>clippedImageStartX - 0 * <li>clippedImageStartY - 0 * <li>clippedImageWidth - 0 (means: use image width) * <li>clippedImageHeight - 0 (means: use image height) * <li>clippedImageDestinationWidth - 0 (means: use clippedImageWidth) * <li>clippedImageDestinationHeight - 0 (means: use clippedImageHeight) * <li>category * </ul> * * @param url * @param listening When set to false, the Picture can't be dragged or picked, * but it will be drawn faster and use less memory. */ public Picture(String url) { super(ShapeType.PICTURE, url, true, LienzoCore.get().getDefaultImageSelectionMode()); getImageProxy().load(url); }
public final String getFontFamily() { String family = getString(Attribute.FONT_FAMILY.getProperty()); if ((null == family) || (family = family.trim()).isEmpty()) { family = LienzoCore.get().getDefaultFontFamily(); } return family; }
public final String getFontStyle() { String style = getString(Attribute.FONT_STYLE.getProperty()); if ((null == style) || (style = style.trim()).isEmpty()) { style = LienzoCore.get().getDefaultFontStyle(); } return style; }
public final void setFontSize(double points) { if (points <= 0.0) { points = LienzoCore.get().getDefaultFontSize(); } put(Attribute.FONT_SIZE.getProperty(), points); }
public final boolean isFillShapeForSelection() { if (isDefined(Attribute.FILL_SHAPE_FOR_SELECTION)) { return getBoolean(Attribute.FILL_SHAPE_FOR_SELECTION.getProperty()); } return LienzoCore.get().getDefaultFillShapeForSelection(); }
cursor = LienzoCore.get().getDefaultNormalCursor();
public final boolean isNativeLineDashSupported() { if (false == m_nativeLineDashExamine) { m_nativeLineDashSupport = examineNativeLineDashSupported(); m_nativeLineDashExamine = true; } return m_nativeLineDashSupport; }
/** * Creates a Picture from an ImageResource. * The following attributes are defaulted: * <ul> * <li>clippedImageStartX - 0 * <li>clippedImageStartY - 0 * <li>clippedImageWidth - 0 (means: use image width) * <li>clippedImageHeight - 0 (means: use image height) * <li>clippedImageDestinationWidth - 0 (means: use clippedImageWidth) * <li>clippedImageDestinationHeight - 0 (means: use clippedImageHeight) * <li>category * </ul> * * @param resource ImageResource * @param listening When set to false, the Picture can't be dragged or picked, * but it will be drawn faster and use less memory. */ public Picture(ImageResource resource) { super(ShapeType.PICTURE, resource, true, LienzoCore.get().getDefaultImageSelectionMode()); getImageProxy().load(resource); }
public final String getFontFamily() { String family = getString(Attribute.FONT_FAMILY.getProperty()); if ((null == family) || (family = family.trim()).isEmpty()) { family = LienzoCore.get().getDefaultFontFamily(); } return family; }
public final String getFontStyle() { String style = getString(Attribute.FONT_STYLE.getProperty()); if ((null == style) || (style = style.trim()).isEmpty()) { style = LienzoCore.get().getDefaultFontStyle(); } return style; }
public final double getFontSize() { double points = getDouble(Attribute.FONT_SIZE.getProperty()); if (points <= 0.0) { points = LienzoCore.get().getDefaultFontSize(); } return points; }
public final boolean isFillShapeForSelection() { if (isDefined(Attribute.FILL_SHAPE_FOR_SELECTION)) { return getBoolean(Attribute.FILL_SHAPE_FOR_SELECTION.getProperty()); } return LienzoCore.get().getDefaultFillShapeForSelection(); }
cursor = LienzoCore.get().getDefaultNormalCursor();
public final boolean isNativeLineDashSupported() { if (false == m_nativeLineDashExamine) { m_nativeLineDashSupport = examineNativeLineDashSupported(); m_nativeLineDashExamine = true; } return m_nativeLineDashSupport; }