org.gudy.azureus2.ui.swt.components
Class BufferedGraphicTableItem1
java.lang.Object
org.gudy.azureus2.ui.swt.components.BufferedTableItemImpl
org.gudy.azureus2.ui.swt.components.BufferedGraphicTableItem1
- All Implemented Interfaces:
- BufferedGraphicTableItem, BufferedTableItem
public abstract class BufferedGraphicTableItem1
- extends BufferedTableItemImpl
- implements BufferedGraphicTableItem
Draws an image at a column in a row of a table using direct paints to the
table.
In comparison to BufferedGraphicTable2,
Pros:
- Cleaner
- More proper
Cons:
- Bug - overpainting of table causing our cell to redraw everytime any other cell redraws
(New for Windows since SWT3.0M8, always been there for linux)
- other bugs
- Author:
- TuxPaper
- See Also:
BufferedGraphicTable2
Methods inherited from class org.gudy.azureus2.ui.swt.components.BufferedTableItemImpl |
getBackground, getForeground, getHeight, getIcon, getMaxLines, getPosition, getTable, getText, isInPaintItem, isMouseOver, isShown, locationChanged, quickRedrawCell, redraw, setCursor, setForeground, setForeground, setIcon, setRowForeground, setText |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferedGraphicTableItem1
public BufferedGraphicTableItem1(BufferedTableRow row,
int position)
getGraphic
public org.eclipse.swt.graphics.Image getGraphic()
- Retrieve the graphic related to this table item.
- Specified by:
getGraphic
in interface BufferedGraphicTableItem
- Returns:
- the Image that is draw in the cell, or null if there is none.
setGraphic
public boolean setGraphic(org.eclipse.swt.graphics.Image img)
- Specified by:
setGraphic
in interface BufferedGraphicTableItem
needsPainting
public boolean needsPainting()
- Specified by:
needsPainting
in interface BufferedTableItem
- Overrides:
needsPainting
in class BufferedTableItemImpl
dispose
public void dispose()
- Specified by:
dispose
in interface BufferedTableItem
- Overrides:
dispose
in class BufferedTableItemImpl
getBoundsForCanvas
public org.eclipse.swt.graphics.Rectangle getBoundsForCanvas()
- Calculate the bounds of the receiver should be drawing in
- Returns:
- what size/position the canvas should be
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds()
- Specified by:
getBounds
in interface BufferedTableItem
- Overrides:
getBounds
in class BufferedTableItemImpl
getBoundsRaw
public org.eclipse.swt.graphics.Rectangle getBoundsRaw()
- Specified by:
getBoundsRaw
in interface BufferedTableItem
- Overrides:
getBoundsRaw
in class BufferedTableItemImpl
getSize
public org.eclipse.swt.graphics.Point getSize()
- Specified by:
getSize
in interface BufferedGraphicTableItem
invalidate
public void invalidate()
- Specified by:
invalidate
in interface BufferedTableItem
getMarginHeight
public int getMarginHeight()
- Specified by:
getMarginHeight
in interface BufferedGraphicTableItem
getMarginWidth
public int getMarginWidth()
- Specified by:
getMarginWidth
in interface BufferedGraphicTableItem
setMargin
public void setMargin(int width,
int height)
- Specified by:
setMargin
in interface BufferedGraphicTableItem
getOrientation
public int getOrientation()
- Specified by:
getOrientation
in interface BufferedGraphicTableItem
setOrientation
public void setOrientation(int orientation)
- Description copied from interface:
BufferedGraphicTableItem
- Orientation of cell. SWT.LEFT, SWT.RIGHT, SWT.CENTER, or SWT.FILL.
When SWT.FILL, update() will be called when the size of the cell has
changed.
- Specified by:
setOrientation
in interface BufferedGraphicTableItem
getBackgroundImage
public org.eclipse.swt.graphics.Image getBackgroundImage()
- Specified by:
getBackgroundImage
in interface BufferedTableItem
- Overrides:
getBackgroundImage
in class BufferedTableItemImpl