/** * {@inheritDoc} */ @Override public void paintValue(Graphics gfx, Rectangle box) { editor.paintValue(gfx, box); }
/** * {@inheritDoc} */ @Override public void paintValue(Graphics gfx, Rectangle box) { delegate.paintValue(gfx, box); }
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { pe.paintValue(gfx, box); }
@Override public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { //issue 33341 - don't allow editors to paint if value not set if (isPaintable()) { ed.paintValue(gfx, box); } }
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { //issue 33341 - don't allow editors to paint if value not set if (isPaintable()) { ed.paintValue(gfx, box); } }
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { //issue 33341 - don't allow editors to paint if value not set if (isPaintable()) { ed.paintValue(gfx, box); } }
@Override public void paintValue(Graphics gfx, Rectangle box) { getPropertyEditor().paintValue(gfx, box); }
@Override public void paintComponent(Graphics g) { Insets i = this.getInsets(); Rectangle box = new Rectangle(i.left, i.top, this.getWidth() - i.right, this.getHeight() - i.bottom); g.setColor(isSelected ? list.getSelectionBackground() : list .getBackground()); g.fillRect(0, 0, this.getWidth(), this.getHeight()); g.setColor(isSelected ? list.getSelectionForeground() : list .getForeground()); e.paintValue(g, box); }
@Override public void paintComponent(Graphics g) { Insets i = this.getInsets(); Rectangle box = new Rectangle(i.left, i.top, this.getWidth() - i.right, this.getHeight() - i.bottom); g.setColor(isSelected ? list.getSelectionBackground() : list .getBackground()); g.fillRect(0, 0, this.getWidth(), this.getHeight()); g.setColor(isSelected ? list.getSelectionForeground() : list .getForeground()); e.paintValue(g, box); }
protected void paintComponent( final Graphics g ) { final PropertyEditor propertyEditor = getPropertyEditor(); if ( propertyEditor == null ) { return; } if ( propertyEditor.isPaintable() == false ) { return; } propertyEditor.paintValue( g, new Rectangle( 0, 0, getWidth(), getHeight() ) ); } }
public void paintValue(Graphics gfx, Rectangle box) { if (!isPaintable()) return; if (isUseDelegatePropertyEditor()) { if (delegatePropertyEditor != null) { delegatePropertyEditor.paintValue(gfx, box); } return; } if (isValueBindingValue()) { // special handling of Boolean or boolean typed property to avoid ClassCastException in NetBeans propertysheet code Class c = designProperty.getPropertyDescriptor().getPropertyType(); if ((c == Boolean.class) || (c == boolean.class)) { JLabel lbl = new JLabel(BOUND_ICON, JLabel.LEFT); String text = getAsText(); lbl.setText(text == null ? "" : text); //NOI18N lbl.setBounds(box); // get the forground color from the graphics object as this may be a select row of the // property sheet in which the foreground needs to be selected foreground lbl.setForeground(gfx.getColor()); lbl.paint(gfx); } } }
public void paintComponent (Graphics g) { //For property panel usage, allow the editor to paint if (editor != null && !hasFocus() && editor.isPaintable()) { Insets ins = getInsets(); Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0,0,getWidth(),getHeight()); } finally { g.setColor(c); } ins.left += PropUtils.getTextMargin(); editor.paintValue(g, new Rectangle(ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - (ins.top + ins.bottom))); } else { super.paintComponent(g); } }
public void paintComponent (Graphics g) { //For property panel usage, allow the editor to paint if (editor != null && !hasFocus() && editor.isPaintable()) { Insets ins = getInsets(); Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0,0,getWidth(),getHeight()); } finally { g.setColor(c); } ins.left += PropUtils.getTextMargin(); editor.paintValue(g, new Rectangle(ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - (ins.top + ins.bottom))); } else { super.paintComponent(g); } }
@Override public void paintComponent(Graphics g) { //For property panel usage, allow the editor to paint if ((editor != null) && !hasFocus() && editor.isPaintable()) { Insets ins = getInsets(); Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); } finally { g.setColor(c); } ins.left += PropUtils.getTextMargin(); editor.paintValue( g, new Rectangle( ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - (ins.top + ins.bottom) ) ); } else { g.setColor(Color.red); super.paintComponent(g); } }
public void paintComponent (Graphics g) { //For property panel usage, allow the editor to paint if (editor != null && !hasFocus() && editor.isPaintable()) { Insets ins = getInsets(); Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0,0,getWidth(),getHeight()); } finally { g.setColor(c); } ins.left += PropUtils.getTextMargin(); editor.paintValue(g, new Rectangle(ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - (ins.top + ins.bottom))); } else { super.paintComponent(g); } } }
public void paintComponent (Graphics g) { //For property panel usage, allow the editor to paint if (editor != null && !hasFocus() && editor.isPaintable()) { Insets ins = getInsets(); Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0,0,getWidth(),getHeight()); } finally { g.setColor(c); } ins.left += PropUtils.getTextMargin(); editor.paintValue(g, new Rectangle(ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - (ins.top + ins.bottom))); } else { super.paintComponent(g); } } }
@Override public void paintComponent(Graphics g) { //For property panel usage, allow the editor to paint if ((editor != null) && !hasFocus() && editor.isPaintable()) { Insets ins = getInsets(); Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); } finally { g.setColor(c); } ins.left += PropUtils.getTextMargin(); editor.paintValue( g, new Rectangle( ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - (ins.top + ins.bottom) ) ); } else { super.paintComponent(g); } }
/** * Paints the component, using the property editor's paint method. * * @param g the current graphics context */ @Override public void paintComponent(Graphics g) { if (!m_HasCustomPanel) { Insets i = getInsets(); Rectangle box = new Rectangle(i.left, i.top, getSize().width - i.left - i.right - 1, getSize().height - i.top - i.bottom - 1); g.clearRect(i.left, i.top, getSize().width - i.right - i.left, getSize().height - i.bottom - i.top); m_Editor.paintValue(g, box); } }
private void delegatedPaint(Graphics g) { Color c = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(getForeground()); if (!tableUI) { //in the panel, give self-painting editors a lowered //border so they look like something Border b = BorderFactory.createBevelBorder(BevelBorder.LOWERED); b.paintBorder(this, g, 0, 0, getWidth(), getHeight()); } Rectangle r = getBounds(); //XXX May be the source of Rochelle's multiple rows of error //marking misalignment problem...(I do not jest) r.x = (getWidth() > 16) ? ((editor instanceof Boolean3WayEditor) ? 0 : 3) : 0; //align text with other renderers r.width -= ((getWidth() > 16) ? ((editor instanceof Boolean3WayEditor) ? 0 : 3) : 0); //align text with other renderers r.y = 0; editor.paintValue(g, r); } finally { g.setColor(c); } }
/** * Paints the component, using the property editor's paint method. * * @param g the current graphics context */ @Override public void paintComponent(Graphics g) { if (!m_HasCustomPanel) { Insets i = getInsets(); Rectangle box = new Rectangle(i.left, i.top, getSize().width - i.left - i.right - 1, getSize().height - i.top - i.bottom - 1); g.clearRect(i.left, i.top, getSize().width - i.right - i.left, getSize().height - i.bottom - i.top); m_Editor.paintValue(g, box); } }