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); } }
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); } }
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); } }