|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gudy.azureus2.ui.swt.components.BufferedTableRow
public class BufferedTableRow
A buffered Table Row.
We buffer certain properties of TableRow to save CPU cycles. For example, foreground_colors is cached because TableItem.getForegroundColor is expensive when there is no color set, and setForegroundColor is always expensive.
Text is not buffered as SWT does a good job of buffering it already.
Field Summary | |
---|---|
protected ColorCache2.CachedColor |
foreground_cache
|
protected org.eclipse.swt.graphics.Color[] |
foreground_colors
|
protected org.eclipse.swt.graphics.Image[] |
image_values
|
protected TableItemOrTreeItem |
item
|
protected ColorCache2.CachedColor |
ourForeground_cache
|
static int |
REQUIRE_TABLEITEM
|
static int |
REQUIRE_TABLEITEM_INITIALIZED
|
static int |
REQUIRE_VISIBILITY
|
protected TableOrTreeSWT |
table
|
Constructor Summary | |
---|---|
BufferedTableRow(TableOrTreeSWT _table)
Default constructor |
Method Summary | |
---|---|
boolean |
checkWidget(int checkFlags)
Checks if the widget is valid |
void |
dispose()
Disposes of underlying SWT TableItem. |
org.eclipse.swt.graphics.Color |
getBackground()
|
org.eclipse.swt.graphics.Image |
getBackgroundImage()
|
org.eclipse.swt.graphics.Rectangle |
getBounds(int index)
|
org.eclipse.swt.graphics.Color |
getForeground()
|
org.eclipse.swt.graphics.Color |
getForeground(int index)
|
int |
getHeight()
|
org.eclipse.swt.graphics.Image |
getImage(int index)
|
int |
getIndex()
The Index is this item's the position in list. |
TableItemOrTreeItem |
getItem()
|
int |
getSubItemCount()
|
TableItemOrTreeItem[] |
getSubItems()
|
protected TableOrTreeSWT |
getTable()
|
protected String |
getText(int index)
|
boolean |
inPaintItem()
|
void |
invalidate()
Overridable function that is called when row needs invalidation. |
boolean |
isExpanded()
|
boolean |
isSelected()
|
boolean |
isVisible()
Whether the row is currently visible to the user |
boolean |
isVisibleNoSWT()
|
void |
setBackgroundImage(org.eclipse.swt.graphics.Image image)
|
void |
setExpanded(boolean b)
|
boolean |
setForeground(org.eclipse.swt.graphics.Color c)
|
boolean |
setForeground(int index,
org.eclipse.swt.graphics.Color new_color)
|
void |
setForeground(int red,
int green,
int blue)
|
boolean |
setHeight(int iHeight)
|
boolean |
setIconSize(org.eclipse.swt.graphics.Point pt)
|
void |
setImage(int index,
org.eclipse.swt.graphics.Image new_image)
Sets the receiver's image at a column. |
void |
setSelected(boolean bSelected)
|
void |
setSubItemCount(int i)
|
boolean |
setTableItem(int newIndex,
boolean isVisible)
|
boolean |
setTableItem(TableItemOrTreeItem newRow,
boolean isVisible)
|
boolean |
setText(int index,
String new_value)
|
void |
swt_setForeground(int red,
int green,
int blue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REQUIRE_TABLEITEM
public static final int REQUIRE_TABLEITEM_INITIALIZED
public static final int REQUIRE_VISIBILITY
protected TableOrTreeSWT table
protected TableItemOrTreeItem item
protected org.eclipse.swt.graphics.Image[] image_values
protected org.eclipse.swt.graphics.Color[] foreground_colors
protected ColorCache2.CachedColor foreground_cache
protected ColorCache2.CachedColor ourForeground_cache
Constructor Detail |
---|
public BufferedTableRow(TableOrTreeSWT _table)
_table
- Method Detail |
---|
public void dispose()
Disposing of fonts, colors and other resources are the responsibilty of the caller.
public void setImage(int index, org.eclipse.swt.graphics.Image new_image)
index
- the column indexnew_image
- the new imagepublic org.eclipse.swt.graphics.Image getImage(int index)
public boolean checkWidget(int checkFlags)
checkFlags
- REQUIRE_* flags (OR'd)
public org.eclipse.swt.graphics.Color getForeground()
public boolean setForeground(org.eclipse.swt.graphics.Color c)
public void setForeground(int red, int green, int blue)
public void swt_setForeground(int red, int green, int blue)
public boolean setForeground(int index, org.eclipse.swt.graphics.Color new_color)
public org.eclipse.swt.graphics.Color getForeground(int index)
protected String getText(int index)
public boolean setText(int index, String new_value)
index
- new_value
-
public org.eclipse.swt.graphics.Rectangle getBounds(int index)
protected TableOrTreeSWT getTable()
public org.eclipse.swt.graphics.Color getBackground()
public int getIndex()
public boolean isSelected()
public void setSelected(boolean bSelected)
public boolean setTableItem(int newIndex, boolean isVisible)
public boolean setTableItem(TableItemOrTreeItem newRow, boolean isVisible)
public boolean setHeight(int iHeight)
public int getHeight()
public boolean setIconSize(org.eclipse.swt.graphics.Point pt)
public boolean isVisible()
public void invalidate()
public void setBackgroundImage(org.eclipse.swt.graphics.Image image)
public org.eclipse.swt.graphics.Image getBackgroundImage()
public void setSubItemCount(int i)
public int getSubItemCount()
public TableItemOrTreeItem[] getSubItems()
public void setExpanded(boolean b)
public boolean isExpanded()
public boolean inPaintItem()
public boolean isVisibleNoSWT()
public TableItemOrTreeItem getItem()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |