private JLabel getStepLabel() { JXLabel stepLabel = new JXLabel(step.getStepTitle()); stepLabel.setFont(stepLabel.getFont().deriveFont(Font.BOLD, 20)); stepLabel.setLineWrap(true); stepLabel.setBorder(createEmptyBorder(0, 0, 5, 0)); return stepLabel; } }
ty = getFontMetrics(getFont()).getHeight(); double cw = (getWidth() - Math.abs(ty * Math.sin(textRotation))) / Math.abs(Math.cos(textRotation));
ty = getFontMetrics(getFont()).getHeight(); double cw = (getWidth() - Math.abs(ty * Math.sin(textRotation))) / Math.abs(Math.cos(textRotation));
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; }
ty = getFontMetrics(getFont()).getHeight(); double cw = (getWidth() - Math.abs(ty * Math.sin(textRotation))) / Math.abs(Math.cos(textRotation));
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; }
ty = getFontMetrics(getFont()).getHeight(); double cw = (getWidth() - Math.abs(ty * Math.sin(textRotation))) / Math.abs(Math.cos(textRotation));
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; }
ty = getFontMetrics(getFont()).getHeight(); double cw = (getWidth() - Math.abs(ty * Math.sin(textRotation))) / Math.abs(Math.cos(textRotation));
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; }
textR.height = getFont().getSize();
textR.height = getFont().getSize();
textR.height = getFont().getSize();
textR.height = getFont().getSize();
textR.height = getFont().getSize();