/** * Sets style of wrapping the text. * @see TextAlignment for accepted values. * @param alignment */ public void setTextAlignment(TextAlignment alignment) { TextAlignment old = getTextAlignment(); this.textAlignment = alignment; firePropertyChange("textAlignment", old, getTextAlignment()); }
/** * Sets style of wrapping the text. * @see TextAlignment for accepted values. * @param alignment */ public void setTextAlignment(TextAlignment alignment) { TextAlignment old = getTextAlignment(); this.textAlignment = alignment; firePropertyChange("textAlignment", old, getTextAlignment()); }
/** * Sets style of wrapping the text. * @see TextAlignment for accepted values. * @param alignment */ public void setTextAlignment(TextAlignment alignment) { TextAlignment old = getTextAlignment(); this.textAlignment = alignment; firePropertyChange("textAlignment", old, getTextAlignment()); }
/** * Sets style of wrapping the text. * @see TextAlignment for accepted values. * @param alignment */ public void setTextAlignment(TextAlignment alignment) { TextAlignment old = getTextAlignment(); this.textAlignment = alignment; firePropertyChange("textAlignment", old, getTextAlignment()); }
/** * Sets style of wrapping the text. * @see TextAlignment for accepted values. * @param alignment */ public void setTextAlignment(TextAlignment alignment) { TextAlignment old = getTextAlignment(); this.textAlignment = alignment; firePropertyChange("textAlignment", old, getTextAlignment()); }
public static View createView(JXLabel c) { BasicEditorKit kit = getFactory(); float rightIndent = 0; if (c.getIcon() != null && c.getHorizontalTextPosition() != SwingConstants.CENTER) { rightIndent = c.getIcon().getIconWidth() + c.getIconTextGap(); } Document doc = kit.createDefaultDocument(c.getFont(), c.getForeground(), c.getTextAlignment(), rightIndent); Reader r = new StringReader(c.getText() == null ? "" : c.getText()); try { kit.read(r, doc, 0); } catch (Throwable e) { } ViewFactory f = kit.getViewFactory(); View hview = f.create(doc.getDefaultRootElement()); View v = new Renderer(c, f, hview, true); return v; }
public static View createView(JXLabel c) { BasicEditorKit kit = getFactory(); float rightIndent = 0; if (c.getIcon() != null && c.getHorizontalTextPosition() != SwingConstants.CENTER) { rightIndent = c.getIcon().getIconWidth() + c.getIconTextGap(); } Document doc = kit.createDefaultDocument(c.getFont(), c.getForeground(), c.getTextAlignment(), rightIndent); Reader r = new StringReader(c.getText() == null ? "" : c.getText()); try { kit.read(r, doc, 0); } catch (Throwable e) { } ViewFactory f = kit.getViewFactory(); View hview = f.create(doc.getDefaultRootElement()); View v = new Renderer(c, f, hview, true); return v; }
public static View createView(JXLabel c) { BasicEditorKit kit = getFactory(); float rightIndent = 0; if (c.getIcon() != null && c.getHorizontalTextPosition() != SwingConstants.CENTER) { rightIndent = c.getIcon().getIconWidth() + c.getIconTextGap(); } Document doc = kit.createDefaultDocument(c.getFont(), c.getForeground(), c.getTextAlignment(), rightIndent); Reader r = new StringReader(c.getText() == null ? "" : c.getText()); try { kit.read(r, doc, 0); } catch (Throwable e) { } ViewFactory f = kit.getViewFactory(); View hview = f.create(doc.getDefaultRootElement()); View v = new Renderer(c, f, hview, true); return v; }
public static View createView(JXLabel c) { BasicEditorKit kit = getFactory(); float rightIndent = 0; if (c.getIcon() != null && c.getHorizontalTextPosition() != SwingConstants.CENTER) { rightIndent = c.getIcon().getIconWidth() + c.getIconTextGap(); } Document doc = kit.createDefaultDocument(c.getFont(), c.getForeground(), c.getTextAlignment(), rightIndent); Reader r = new StringReader(c.getText() == null ? "" : c.getText()); try { kit.read(r, doc, 0); } catch (Throwable e) { } ViewFactory f = kit.getViewFactory(); View hview = f.create(doc.getDefaultRootElement()); View v = new Renderer(c, f, hview, true); return v; }
public static View createView(JXLabel c) { BasicEditorKit kit = getFactory(); float rightIndent = 0; if (c.getIcon() != null && c.getHorizontalTextPosition() != SwingConstants.CENTER) { rightIndent = c.getIcon().getIconWidth() + c.getIconTextGap(); } Document doc = kit.createDefaultDocument(c.getFont(), c.getForeground(), c.getTextAlignment(), rightIndent); Reader r = new StringReader(c.getText() == null ? "" : c.getText()); try { kit.read(r, doc, 0); } catch (Throwable e) { } ViewFactory f = kit.getViewFactory(); View hview = f.create(doc.getDefaultRootElement()); View v = new Renderer(c, f, hview, true); return v; }