public Dimension getPreferredSize() { //Optimize it shows 16% of painting time is in this call. In some //cases it will be called more than once, so cache the return value if (prefSize == null) { JComponent jc = getRenderer(this); prefSize = jc.getPreferredSize(); } return prefSize; }
public Dimension getPreferredSize() { //Optimize it shows 16% of painting time is in this call. In some //cases it will be called more than once, so cache the return value if (prefSize == null) { JComponent jc = getRenderer(this); prefSize = jc.getPreferredSize(); } return prefSize; }
public Dimension getPreferredSize() { //Optimize it shows 16% of painting time is in this call. In some //cases it will be called more than once, so cache the return value if (prefSize == null) { JComponent jc = getRenderer(this); prefSize = jc.getPreferredSize(); } return prefSize; }
public boolean isTitleDisplayed() { if (!useLabels) { return false; } JComponent jc = getRenderer(this); if (jc instanceof InplaceEditor) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor((InplaceEditor) jc); return innermost instanceof CheckboxInplaceEditor || innermost instanceof RadioInplaceEditor; } return false; }
public boolean isTitleDisplayed() { if (!useLabels) { return false; } JComponent jc = getRenderer(this); if (jc instanceof InplaceEditor) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor((InplaceEditor)jc); return innermost instanceof CheckboxInplaceEditor || innermost instanceof RadioInplaceEditor; } return false; }
public boolean isTitleDisplayed() { if (!useLabels) { return false; } JComponent jc = getRenderer(this); if (jc instanceof InplaceEditor) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor((InplaceEditor)jc); return innermost instanceof CheckboxInplaceEditor || innermost instanceof RadioInplaceEditor; } return false; }
public final Dimension getPreferredSize() { Dimension result; if (inner == null) { //Use the renderer infrastructure to do it if we're not initialized result = new RendererPropertyDisplayer(getProperty()).getRenderer(this).getPreferredSize(); } else { result = inner.getPreferredSize(); } return result; }
public final Dimension getPreferredSize() { Dimension result; if (inner == null) { //Use the renderer infrastructure to do it if we're not initialized result = new RendererPropertyDisplayer(getProperty()).getRenderer(this).getPreferredSize(); } else { result = inner.getPreferredSize(); } return result; }
public final Dimension getPreferredSize() { Dimension result; if (inner == null) { //Use the renderer infrastructure to do it if we're not initialized result = new RendererPropertyDisplayer(getProperty()).getRenderer(this).getPreferredSize(); } else { result = inner.getPreferredSize(); } return result; }
public String toString() { StringBuffer sb = new StringBuffer("Inline editor for property "); //NOI18N sb.append(getProperty().getDisplayName()); sb.append(" = "); //NOI18N sb.append(getProperty()); sb.append(" inplace editor="); //NOI18N if (!inGetRenderer) { try { sb.append(getRenderer(this)); } catch (Exception e) { sb.append(e); } } return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer("Inline editor for property "); //NOI18N sb.append(getProperty().getDisplayName()); sb.append(" = "); //NOI18N sb.append(getProperty()); sb.append(" inplace editor="); //NOI18N if (!inGetRenderer) { try { sb.append(getRenderer(this)); } catch (Exception e) { sb.append(e); } } return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer("Inline editor for property "); //NOI18N sb.append(getProperty().getDisplayName()); sb.append(" = "); //NOI18N sb.append(getProperty()); sb.append(" inplace editor="); //NOI18N if (!inGetRenderer) { try { sb.append(getRenderer(this)); } catch (Exception e) { sb.append(e); } } return sb.toString(); }
public void setUseLabels(boolean useLabels) { if (useLabels != this.useLabels) { Dimension oldPreferredSize = null; if (isShowing()) { JComponent innermost = findInnermostRenderer(getRenderer(this)); if (innermost instanceof RadioInplaceEditor || innermost instanceof JCheckBox) { oldPreferredSize = getPreferredSize(); } } this.useLabels = useLabels; if (oldPreferredSize != null) { firePropertyChange("preferredSize", oldPreferredSize, getPreferredSize()); //NOI18N } } }
public void setUseLabels(boolean useLabels) { if (useLabels != this.useLabels) { Dimension oldPreferredSize=null; if (isShowing()) { JComponent innermost = findInnermostRenderer(getRenderer(this)); if (innermost instanceof RadioInplaceEditor || innermost instanceof JCheckBox) { oldPreferredSize = getPreferredSize(); } } this.useLabels = useLabels; if (oldPreferredSize != null) { firePropertyChange("preferredSize", oldPreferredSize, getPreferredSize()); //NOI18N } } }
public void setUseLabels(boolean useLabels) { if (useLabels != this.useLabels) { Dimension oldPreferredSize=null; if (isShowing()) { JComponent innermost = findInnermostRenderer(getRenderer(this)); if (innermost instanceof RadioInplaceEditor || innermost instanceof JCheckBox) { oldPreferredSize = getPreferredSize(); } } this.useLabels = useLabels; if (oldPreferredSize != null) { firePropertyChange("preferredSize", oldPreferredSize, getPreferredSize()); //NOI18N } } }
public void paintComponent(Graphics g) { //Hack for issue 38132 - Beans are set via TTVBridge as a package //private property on the parent PropertyPanel (if there is one). //FindBeans() will locate the beans either in the model or as a //property of the PropertyPanel (if an esoteric undocumented client property //is set on the PropertyPanel). RendererFactory will set the env //value (if there is an env) to the value of ReusablePropertyEnv.NODE //(a performance hack to avoid creating 1 property env for each property //painted each time we paint). Cool, huh? reusableEnv.setNode(EditorPropertyDisplayer.findBeans(this)); JComponent comp = getRenderer(this); prepareRenderer(comp); comp.setBounds(0,0,getWidth(),getHeight()); if (comp instanceof InplaceEditor) { Component inner = findInnermostRenderer(comp); SwingUtilities.paintComponent (g, comp, this, 0, 0, getWidth(), getHeight()); return; } comp.paint(g); }
public void paintComponent(Graphics g) { //Hack for issue 38132 - Beans are set via TTVBridge as a package //private property on the parent PropertyPanel (if there is one). //FindBeans() will locate the beans either in the model or as a //property of the PropertyPanel (if an esoteric undocumented client property //is set on the PropertyPanel). RendererFactory will set the env //value (if there is an env) to the value of ReusablePropertyEnv.NODE //(a performance hack to avoid creating 1 property env for each property //painted each time we paint). Cool, huh? reusableEnv.setNode(EditorPropertyDisplayer.findBeans(this)); JComponent comp = getRenderer(this); prepareRenderer(comp); comp.setBounds(0,0,getWidth(),getHeight()); if (comp instanceof InplaceEditor) { Component inner = findInnermostRenderer(comp); SwingUtilities.paintComponent (g, comp, this, 0, 0, getWidth(), getHeight()); return; } comp.paint(g); }
public void paintComponent(Graphics g) { //Hack for issue 38132 - Beans are set via TTVBridge as a package //private property on the parent PropertyPanel (if there is one). //FindBeans() will locate the beans either in the model or as a //property of the PropertyPanel (if an esoteric undocumented client property //is set on the PropertyPanel). RendererFactory will set the env //value (if there is an env) to the value of ReusablePropertyEnv.NODE //(a performance hack to avoid creating 1 property env for each property //painted each time we paint). Cool, huh? reusableEnv.setNode(EditorPropertyDisplayer.findBeans(this)); JComponent comp = getRenderer(this); prepareRenderer(comp); comp.setBounds(0, 0, getWidth(), getHeight()); if (comp instanceof InplaceEditor) { Component inner = findInnermostRenderer(comp); SwingUtilities.paintComponent(g, comp, this, 0, 0, getWidth(), getHeight()); removeAll(); return; } comp.paint(g); }