/** Paint the outside margin where the spinners for expandable * sets are. This should be derived from the standard control * color. This method will overpaint the grid lines in this * area. */ private void paintMargin(Graphics g) { //Don't paint the margin for sorted modes //fill the outer column with the set renderer color, per UI spec g.setColor(PropUtils.getSetRendererColor()); int w = PropUtils.getMarginWidth(); int h = getHeight(); if (g.hitClip(0, 0, w, h)) { g.fillRect(0, 0, w, h); } }
/** Paint the outside margin where the spinners for expandable * sets are. This should be derived from the standard control * color. This method will overpaint the grid lines in this * area. */ private void paintMargin (Graphics g) { //Don't paint the margin for sorted modes //fill the outer column with the set renderer color, per UI spec g.setColor (PropUtils.getSetRendererColor()); int w = PropUtils.getMarginWidth(); int h = getHeight(); if (g.hitClip(0,0,w,h)) { g.fillRect (0,0,w,h); } }
/** Paint the outside margin where the spinners for expandable * sets are. This should be derived from the standard control * color. This method will overpaint the grid lines in this * area. */ private void paintMargin (Graphics g) { //Don't paint the margin for sorted modes //fill the outer column with the set renderer color, per UI spec g.setColor (PropUtils.getSetRendererColor()); int w = PropUtils.getMarginWidth(); int h = getHeight(); if (g.hitClip(0,0,w,h)) { g.fillRect (0,0,w,h); } }
/** * */ public void paint(Graphics g) { Rectangle bounds = getState().getRectangle(); if (g.hitClip(bounds.x, bounds.y, bounds.width, bounds.height)) { Graphics2D g2 = (Graphics2D) g; Stroke stroke = g2.getStroke(); g2.setStroke(getSelectionStroke()); g.setColor(getSelectionColor()); g.drawRect(bounds.x, bounds.y, bounds.width, bounds.height); g2.setStroke(stroke); } super.paint(g); }
/** * */ public void paint(Graphics g) { Rectangle bounds = getState().getRectangle(); if (g.hitClip(bounds.x, bounds.y, bounds.width, bounds.height)) { Graphics2D g2 = (Graphics2D) g; Stroke stroke = g2.getStroke(); g2.setStroke(getSelectionStroke()); g.setColor(getSelectionColor()); g.drawRect(bounds.x, bounds.y, bounds.width, bounds.height); g2.setStroke(stroke); } super.paint(g); }
/** * Paints the visible handles of this handler. */ public void paint(Graphics g) { if (handles != null && isHandlesVisible()) { for (int i = 0; i < handles.length; i++) { if (isHandleVisible(i) && g.hitClip(handles[i].x, handles[i].y, handles[i].width, handles[i].height)) { g.setColor(getHandleFillColor(i)); g.fillRect(handles[i].x, handles[i].y, handles[i].width, handles[i].height); g.setColor(getHandleBorderColor(i)); g.drawRect(handles[i].x, handles[i].y, handles[i].width - 1, handles[i].height - 1); } } } }
/** * Paints the visible handles of this handler. */ public void paint(Graphics g) { if (handles != null && isHandlesVisible()) { for (int i = 0; i < handles.length; i++) { if (isHandleVisible(i) && g.hitClip(handles[i].x, handles[i].y, handles[i].width, handles[i].height)) { g.setColor(getHandleFillColor(i)); g.fillRect(handles[i].x, handles[i].y, handles[i].width, handles[i].height); g.setColor(getHandleBorderColor(i)); g.drawRect(handles[i].x, handles[i].y, handles[i].width - 1, handles[i].height - 1); } } } }
/** * */ public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Stroke stroke = g2.getStroke(); g2.setStroke(getSelectionStroke()); g.setColor(getSelectionColor()); Point last = state.getAbsolutePoint(0).getPoint(); for (int i = 1; i < state.getAbsolutePointCount(); i++) { Point current = state.getAbsolutePoint(i).getPoint(); Line2D line = new Line2D.Float(last.x, last.y, current.x, current.y); Rectangle bounds = g2.getStroke().createStrokedShape(line) .getBounds(); if (g.hitClip(bounds.x, bounds.y, bounds.width, bounds.height)) { g2.draw(line); } last = current; } g2.setStroke(stroke); super.paint(g); }
/** Overridden to draw "no properties" if necessary */ public void paint(Graphics g, JComponent c) { Component view = ((JViewport) c).getView(); if (view != null) { lastKnownSize = view.getSize(); } if (stringWidth == -1) { calcStringSizes(c.getFont(), g); } //Update will have set paintNoProps to the correct value if (shouldPaintEmptyMessage()) { //We need to paint centered "<No Properties>" text g.setFont(c.getFont()); g.setColor(c.getForeground()); Rectangle r = getEmptyMessageBounds(); //See if we really need to do any painting if (g.hitClip(r.x, r.y, r.width, r.height)) { //Paint the string g.drawString(emptyString, r.x, r.y + ascent); } } }
/** Overridden to draw "no properties" if necessary */ public void paint(Graphics g, JComponent c) { Component view = ((JViewport) c).getView(); if (view != null) { lastKnownSize = view.getSize(); } if (stringWidth == -1) { calcStringSizes (c.getFont(), g); } //Update will have set paintNoProps to the correct value if (shouldPaintEmptyMessage()) { //We need to paint centered "<No Properties>" text g.setFont (c.getFont()); g.setColor (c.getForeground()); Rectangle r = getEmptyMessageBounds(); //See if we really need to do any painting if (g.hitClip (r.x, r.y, r.width, r.height)) { //Paint the string g.drawString(emptyString, r.x, r.y + ascent); } } }
/** Overridden to draw "no properties" if necessary */ public void paint(Graphics g, JComponent c) { Component view = ((JViewport) c).getView(); if (view != null) { lastKnownSize = view.getSize(); } if (stringWidth == -1) { calcStringSizes (c.getFont(), g); } //Update will have set paintNoProps to the correct value if (shouldPaintEmptyMessage()) { //We need to paint centered "<No Properties>" text g.setFont (c.getFont()); g.setColor (c.getForeground()); Rectangle r = getEmptyMessageBounds(); //See if we really need to do any painting if (g.hitClip (r.x, r.y, r.width, r.height)) { //Paint the string g.drawString(emptyString, r.x, r.y + ascent); } } }
/** * */ public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Stroke stroke = g2.getStroke(); g2.setStroke(getSelectionStroke()); g.setColor(getSelectionColor()); Point last = state.getAbsolutePoint(0).getPoint(); for (int i = 1; i < state.getAbsolutePointCount(); i++) { Point current = state.getAbsolutePoint(i).getPoint(); Line2D line = new Line2D.Float(last.x, last.y, current.x, current.y); Rectangle bounds = g2.getStroke().createStrokedShape(line) .getBounds(); if (g.hitClip(bounds.x, bounds.y, bounds.width, bounds.height)) { g2.draw(line); } last = current; } g2.setStroke(stroke); super.paint(g); }
public void paint(Graphics g) { if (isShowing()) { super.paint(g); } else { getLayout().layoutContainer(this); Component[] c = getComponents(); Color col = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); for (int i = 0; i < c.length; i++) { Rectangle r = c[i].getBounds(); if (g.hitClip(r.x, r.y, r.width, r.height)) { Graphics g2 = g.create(r.x, r.y, r.width, r.height); try { c[i].paint(g2); } finally { g2.dispose(); } } } if (getBorder() != null) { super.paintBorder(g); } } finally { g.setColor(col); } } }
public void paint (Graphics g) { if (isShowing()) { super.paint(g); } else { getLayout().layoutContainer(this); Component[] c = getComponents(); Color col = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0,0, getWidth(),getHeight()); for (int i=0; i < c.length; i++) { Rectangle r = c[i].getBounds(); if (g.hitClip(r.x, r.y,r.width,r.height)) { Graphics g2 = g.create(r.x, r.y, r.width, r.height); try { c[i].paint(g2); } finally { g2.dispose(); } } } if (getBorder() != null) { super.paintBorder(g); } } finally { g.setColor(col); } } }
public void paint (Graphics g) { if (isShowing()) { super.paint(g); } else { getLayout().layoutContainer(this); Component[] c = getComponents(); Color col = g.getColor(); try { g.setColor(getBackground()); g.fillRect(0,0, getWidth(),getHeight()); for (int i=0; i < c.length; i++) { Rectangle r = c[i].getBounds(); if (g.hitClip(r.x, r.y,r.width,r.height)) { Graphics g2 = g.create(r.x, r.y, r.width, r.height); try { c[i].paint(g2); } finally { g2.dispose(); } } } if (getBorder() != null) { super.paintBorder(g); } } finally { g.setColor(col); } } }
return delegate.hitClip(x, y, width, height);
r.width = getWidth() - (ins.left + ins.right); if (g.hitClip(r.x, r.y, r.width, r.height)) { PropertySet ps = (PropertySet) value;
r.x = ins.left; r.width = getWidth() - (ins.left + ins.right); if (g.hitClip (r.x, r.y, r.width, r.height)) { PropertySet ps = (PropertySet) value;
r.x = ins.left; r.width = getWidth() - (ins.left + ins.right); if (g.hitClip (r.x, r.y, r.width, r.height)) { PropertySet ps = (PropertySet) value;