Methods Summary |
---|
public void | dispose()
if (ourFGColor != null && !ourFGColor.isDisposed())
ourFGColor.dispose();
|
public void | doPaint(GC gc)
|
public Color | getBackground()
return row.getBackground();
|
public Image | getBackgroundImage()
Table table = row.getTable();
Rectangle bounds = getBounds();
if (bounds.isEmpty()) {
return null;
}
Image image = new Image(table.getDisplay(), bounds.width, bounds.height);
GC gc = new GC(table);
gc.copyArea(image, bounds.x, bounds.y);
gc.dispose();
return image;
|
public Rectangle | getBounds()
if (position != -1)
return row.getBounds(position);
return null;
|
public Color | getForeground()
if (position == -1)
return null;
return row.getForeground(position);
|
public Image | getIcon()
if (position != -1) {
Image image = row.getImage(position);
return (image != null) ? image : icon;
}
return null;
|
public int | getMaxLines()
return 1;
|
public int | getPosition()
return position;
|
public org.eclipse.swt.widgets.Table | getTable()
return row.getTable();
|
public java.lang.String | getText()
if (Utils.SWT32_TABLEPAINT) {
return text;
}
if (position != -1)
return row.getText(position);
return "";
|
public boolean | isShown()
return true;
// XXX Bounds check is almost always slower than any changes we
// are going to do to the column
// if (position < 0) {
// return false;
// }
//
// Rectangle bounds = row.getBounds(position);
// if (bounds == null) {
// return false;
// }
//
// return row.getTable().getClientArea().intersects(bounds);
|
public void | locationChanged()
|
public boolean | needsPainting()
return false;
|
public void | redraw()
|
public boolean | setForeground(Color color)
if (position == -1)
return false;
boolean ok;
if (ourFGColor != null) {
ok = row.setForeground(position, color);
if (ok) {
if (!color.isDisposed())
color.dispose();
ourFGColor = null;
}
} else {
ok = row.setForeground(position, color);
}
return ok;
|
public boolean | setForeground(int red, int green, int blue)
if (position == -1)
return false;
Color oldColor = row.getForeground(position);
RGB newRGB = new RGB(red, green, blue);
if (oldColor != null && oldColor.getRGB().equals(newRGB)) {
return false;
}
Color newColor = new Color(row.getTable().getDisplay(), newRGB);
boolean ok = row.setForeground(position, newColor);
if (ok) {
if (ourFGColor != null && !ourFGColor.isDisposed())
ourFGColor.dispose();
ourFGColor = newColor;
} else {
if (!newColor.isDisposed())
newColor.dispose();
}
return ok;
|
public void | setIcon(Image img)
if (position != -1) {
row.setImage(position, img);
icon = img;
}
|
public void | setRowForeground(Color color)
row.setForeground(color);
|
public boolean | setText(java.lang.String text)
if (Utils.SWT32_TABLEPAINT) {
if (this.text.equals(text)) {
return false;
}
this.text = (text == null) ? "" : text;
Rectangle bounds = getBounds();
if (bounds != null) {
Table table = row.getTable();
Rectangle dirty = table.getClientArea().intersection(bounds);
table.redraw(dirty.x, dirty.y, dirty.width, dirty.height, false);
}
return true;
}
if (position != -1)
return row.setText(position, text);
return false;
|