static JComponent findInnermostRenderer(JComponent comp) { if (comp instanceof InplaceEditor) { InplaceEditor ine = (InplaceEditor) comp; return PropUtils.findInnermostInplaceEditor(ine).getComponent(); } else { return comp; } }
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; }
static JComponent findInnermostRenderer(JComponent comp) { if (comp instanceof InplaceEditor) { InplaceEditor ine = (InplaceEditor) comp; return PropUtils.findInnermostInplaceEditor(ine).getComponent(); } else { return comp; } }
static JComponent findInnermostRenderer(JComponent comp) { if (comp instanceof InplaceEditor) { InplaceEditor ine = (InplaceEditor) comp; return PropUtils.findInnermostInplaceEditor(ine).getComponent(); } else { return comp; } }
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 (isUseLabels()) { InplaceEditor inp = null; if (inplace != null) { inp = inplace; } else { inp = createInplaceEditor(); } InplaceEditor most = PropUtils.findInnermostInplaceEditor(inp); return (most instanceof RadioInplaceEditor || most instanceof CheckboxInplaceEditor); } return false; }
public boolean isTitleDisplayed() { if (isUseLabels()) { InplaceEditor inp = null; if (inplace != null) { inp = inplace; } else { inp = createInplaceEditor(); } InplaceEditor most = PropUtils.findInnermostInplaceEditor(inp); return (most instanceof RadioInplaceEditor || most instanceof CheckboxInplaceEditor); } return false; }
public final void setUseLabels(boolean useLabels) { if (useLabels != this.useLabels) { boolean needChange = false; if (isShowing()) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor(inplace); needChange = (innermost instanceof RadioInplaceEditor || innermost instanceof JCheckBox); } this.useLabels = useLabels; if (needChange && (inner != null)) { replaceInner(); } } }
public boolean isTitleDisplayed() { if (isUseLabels()) { InplaceEditor inp = null; if (inplace != null) { inp = inplace; } else { inp = createInplaceEditor(); } InplaceEditor most = PropUtils.findInnermostInplaceEditor(inp); return (most instanceof RadioInplaceEditor || most instanceof CheckboxInplaceEditor); } return false; }
public final void setUseLabels(boolean useLabels) { if (useLabels != this.useLabels) { boolean needChange = false; if (isShowing()) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor( inplace); needChange = (innermost instanceof RadioInplaceEditor || innermost instanceof JCheckBox); } this.useLabels = useLabels; if (needChange && inner != null) { replaceInner(); } } }
public final void setUseLabels(boolean useLabels) { if (useLabels != this.useLabels) { boolean needChange = false; if (isShowing()) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor( inplace); needChange = (innermost instanceof RadioInplaceEditor || innermost instanceof JCheckBox); } this.useLabels = useLabels; if (needChange && inner != null) { replaceInner(); } } }
public void run() { InplaceEditor ied = getInplaceEditor(); ied = PropUtils.findInnermostInplaceEditor(ied); JComponent c = ied.getComponent(); if (c instanceof JComboBox && c.isShowing()) { ((JComboBox) c).showPopup(); } } }
public void run() { InplaceEditor ied = getInplaceEditor(); ied = PropUtils.findInnermostInplaceEditor(ied); JComponent c = ied.getComponent(); if (c instanceof JComboBox && c.isShowing()) { ((JComboBox) c).showPopup(); } } });
public void run() { InplaceEditor ied = getInplaceEditor(); ied = PropUtils.findInnermostInplaceEditor(ied); JComponent c = ied.getComponent(); if (c instanceof JComboBox && c.isShowing()) { ((JComboBox) c).showPopup(); } } });
public final void setRadioButtonMax(int max) { if (max != radioButtonMax) { int old = radioButtonMax; boolean needChange = false; if (inplace != null) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor(inplace); if (innermost instanceof JComboBox || innermost instanceof RadioInplaceEditor) { PropertyEditor ped = innermost.getPropertyEditor(); int tagCount = (ped.getTags() == null) ? (-1) : ped.getTags().length; needChange = (old <= tagCount) != (max <= tagCount); } } radioButtonMax = max; if (needChange && (inner != null)) { replaceInner(); firePropertyChange("preferredSize", null, null); //NOI18N } } }
public final void setRadioButtonMax(int max) { if (max != radioButtonMax) { int old = radioButtonMax; boolean needChange=false; if (inplace != null) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor(inplace); if (innermost instanceof JComboBox || innermost instanceof RadioInplaceEditor) { PropertyEditor ped = innermost.getPropertyEditor(); int tagCount = ped.getTags() == null ? -1 : ped.getTags().length; needChange = old <= tagCount != max <= tagCount; } } radioButtonMax = max; if (needChange && inner != null) { replaceInner(); firePropertyChange("preferredSize", null, null); //NOI18N } } }
protected void prepareComponent (InplaceEditor inplace) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor(inplace); JComponent comp = innermost.getComponent(); if (!isTableUI() && inplace.supportsTextEntry()) { comp.setBackground(PropUtils.getTextFieldBackground()); comp.setForeground(PropUtils.getTextFieldForeground()); } else { comp.setBackground(getBackground()); if (!isEnabled() || !prop.canWrite()) { comp.setForeground(UIManager.getColor("textInactiveText")); } else { comp.setForeground(getForeground()); } } comp.setEnabled(isEnabled() && PropUtils.checkEnabled(this, inplace.getPropertyEditor(), getPropertyEnv())); }
protected void prepareComponent (InplaceEditor inplace) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor(inplace); JComponent comp = innermost.getComponent(); if (!isTableUI() && inplace.supportsTextEntry()) { comp.setBackground(PropUtils.getTextFieldBackground()); comp.setForeground(PropUtils.getTextFieldForeground()); } else { comp.setBackground(getBackground()); if (!isEnabled() || !prop.canWrite()) { comp.setForeground(UIManager.getColor("textInactiveText")); } else { comp.setForeground(getForeground()); } } comp.setEnabled(isEnabled() && PropUtils.checkEnabled(this, inplace.getPropertyEditor(), getPropertyEnv())); }
protected void prepareComponent(InplaceEditor inplace) { InplaceEditor innermost = PropUtils.findInnermostInplaceEditor(inplace); JComponent comp = innermost.getComponent(); if (!isTableUI() && inplace.supportsTextEntry()) { comp.setBackground(PropUtils.getTextFieldBackground()); comp.setForeground(PropUtils.getTextFieldForeground()); } else { comp.setBackground(getBackground()); if (!isEnabled() || !prop.canWrite()) { comp.setForeground(UIManager.getColor("textInactiveText")); } else { comp.setForeground(getForeground()); } } if( comp instanceof ComboInplaceEditor ) comp.setEnabled( isEnabled() && getPropertyEnv().isEditable() ); else comp.setEnabled(isEnabled() && PropUtils.checkEnabled(this, inplace.getPropertyEditor(), getPropertyEnv())); }