VIEW
- public abstract class ViewRenderer<VIEW> extends java.lang.Object implements StateSavable
Modifier and Type | Field and Description |
---|---|
protected boolean |
_clipCell |
protected static int |
DEFAULT_LEGEND_HEIGHT |
protected static int |
DEFAULT_LEGEND_WIDTH |
Constructor and Description |
---|
ViewRenderer() |
Modifier and Type | Method and Description |
---|---|
protected void |
_markNull(VIEW v,
VNode rowNode,
VNode columnNode,
java.awt.Graphics2D g2D,
int anchorX,
int anchorY,
int cellWidth,
int cellHeight)
a built in method to mark Null
|
abstract boolean |
canRender(java.lang.Class<?> viewClass) |
static java.awt.image.BufferedImage |
createToolTipFromJLabel(javax.swing.JLabel label) |
static java.awt.image.BufferedImage |
createToolTipFromString(java.lang.String tipString,
java.awt.Font font) |
protected boolean |
getAntiAliasing() |
javax.swing.JComponent |
getConfigUI()
returns the UI for configuration
|
CoolMapObject |
getCoolMapObject() |
org.json.JSONObject |
getCurrentState()
override this to save state to JSON
|
java.lang.String |
getDescription() |
java.awt.Image |
getLegend() |
java.lang.String |
getName() |
java.awt.image.BufferedImage |
getRenderedFullMap(CoolMapObject<?,VIEW> data,
float percentage) |
java.awt.image.BufferedImage |
getRenderedFullMap(CoolMapObject<?,VIEW> data,
float xPercentage,
float yPercentage) |
java.awt.image.BufferedImage |
getRenderedMap(CoolMapObject<?,VIEW> data,
int fromRow,
int toRow,
int fromCol,
int toCol,
float zoomX,
float zoomY) |
java.awt.Image |
getSubTip(CoolMapObject object,
VNode rowNode,
VNode colNode,
float percentX,
float PercentY,
int cellWidth,
int cellHeight) |
protected abstract void |
initialize()
called when this view renderer is assigned to a coolmap object
|
abstract void |
postRender(int fromRow,
int toRow,
int fromCol,
int toCol,
float zoomX,
float zoomY) |
abstract void |
prepareGraphics(java.awt.Graphics2D g2D) |
abstract void |
preRender(int fromRow,
int toRow,
int fromCol,
int toCol,
float zoomX,
float zoomY) |
abstract void |
renderCellHD(VIEW v,
VNode rowNode,
VNode columnNode,
java.awt.Graphics2D g2D,
int anchorX,
int anchorY,
int cellWidth,
int cellHeight) |
abstract void |
renderCellLD(VIEW v,
VNode rowNode,
VNode columnNode,
java.awt.Graphics2D g2D,
int anchorX,
int anchorY,
int cellWidth,
int cellHeight) |
abstract void |
renderCellSD(VIEW v,
VNode rowNode,
VNode columnNode,
java.awt.Graphics2D g2D,
int anchorX,
int anchorY,
int cellWidth,
int cellHeight) |
abstract java.awt.image.BufferedImage |
renderExternalValues(java.util.List<java.lang.String> names,
java.util.List<VIEW> values,
java.awt.Graphics2D g2D) |
boolean |
restoreState(org.json.JSONObject savedState)
override this to make this restorable
|
void |
setAntiAliasing(boolean antiAlias) |
protected void |
setClipCell(boolean clip) |
void |
setCoolMapObject(CoolMapObject object,
boolean initialize) |
void |
setDescription(java.lang.String description) |
void |
setName(java.lang.String name) |
void |
updateRenderer() |
abstract void |
updateRendererChanges()
update parameters changes for the render; will be called in the
updateRenderer function
|
protected static int DEFAULT_LEGEND_WIDTH
protected static int DEFAULT_LEGEND_HEIGHT
protected boolean _clipCell
public java.awt.Image getSubTip(CoolMapObject object, VNode rowNode, VNode colNode, float percentX, float PercentY, int cellWidth, int cellHeight)
public java.awt.Image getLegend()
public final void setCoolMapObject(CoolMapObject object, boolean initialize)
public final CoolMapObject getCoolMapObject()
public java.lang.String getName()
public void setName(java.lang.String name)
public javax.swing.JComponent getConfigUI()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public void updateRenderer()
public abstract void updateRendererChanges()
protected abstract void initialize()
public abstract boolean canRender(java.lang.Class<?> viewClass)
public final void setAntiAliasing(boolean antiAlias)
public abstract void preRender(int fromRow, int toRow, int fromCol, int toCol, float zoomX, float zoomY)
public abstract void prepareGraphics(java.awt.Graphics2D g2D)
public abstract void renderCellLD(VIEW v, VNode rowNode, VNode columnNode, java.awt.Graphics2D g2D, int anchorX, int anchorY, int cellWidth, int cellHeight)
public abstract void renderCellSD(VIEW v, VNode rowNode, VNode columnNode, java.awt.Graphics2D g2D, int anchorX, int anchorY, int cellWidth, int cellHeight)
public abstract void renderCellHD(VIEW v, VNode rowNode, VNode columnNode, java.awt.Graphics2D g2D, int anchorX, int anchorY, int cellWidth, int cellHeight)
public abstract java.awt.image.BufferedImage renderExternalValues(java.util.List<java.lang.String> names, java.util.List<VIEW> values, java.awt.Graphics2D g2D)
protected void _markNull(VIEW v, VNode rowNode, VNode columnNode, java.awt.Graphics2D g2D, int anchorX, int anchorY, int cellWidth, int cellHeight)
v
- rowNode
- columnNode
- g2D
- anchorX
- anchorY
- cellWidth
- cellHeight
- public abstract void postRender(int fromRow, int toRow, int fromCol, int toCol, float zoomX, float zoomY)
public java.awt.image.BufferedImage getRenderedFullMap(CoolMapObject<?,VIEW> data, float xPercentage, float yPercentage)
public java.awt.image.BufferedImage getRenderedFullMap(CoolMapObject<?,VIEW> data, float percentage)
public java.awt.image.BufferedImage getRenderedMap(CoolMapObject<?,VIEW> data, int fromRow, int toRow, int fromCol, int toCol, float zoomX, float zoomY)
protected void setClipCell(boolean clip)
protected final boolean getAntiAliasing()
public static java.awt.image.BufferedImage createToolTipFromJLabel(javax.swing.JLabel label)
public static java.awt.image.BufferedImage createToolTipFromString(java.lang.String tipString, java.awt.Font font)
public org.json.JSONObject getCurrentState()
getCurrentState
in interface StateSavable
public boolean restoreState(org.json.JSONObject savedState)
restoreState
in interface StateSavable
savedState
-