public class KahinaChartView extends KahinaView<KahinaChart>
kahina, model, needsRedraw
Constructor and Description |
---|
KahinaChartView(KahinaChart chartModel,
KahinaInstance<?,?,?,?> kahina) |
KahinaChartView(KahinaInstance<?,?,?,?> kahina) |
Modifier and Type | Method and Description |
---|---|
protected void |
computeSegmentOffsets() |
void |
display(KahinaChart chartModel) |
int |
edgeAtCoordinates(int x,
int y) |
KahinaChartViewConfiguration |
getConfig() |
int |
getDisplayHeight() |
int |
getDisplayWidth() |
java.lang.String |
getEdgeCaption(int edgeID) |
java.awt.Color |
getEdgeColor(int edgeID) |
java.awt.Font |
getEdgeFont(int edgeID) |
int |
getEdgeHeight(int edgeID) |
java.awt.Color |
getEdgeHighlightColor(int edgeID) |
java.lang.Iterable<java.lang.Integer> |
getEdgeIDs() |
java.awt.Stroke |
getEdgeStroke(int edgeID) |
int |
getEdgeWidth(int edgeID) |
int |
getEdgeX(int edgeID) |
int |
getEdgeY(int edgeID) |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f,
java.awt.Stroke s,
int fontSize) |
int |
getMarkedEdge() |
int |
getNumberOfSegments() |
java.lang.String |
getSegmentCaption(int segmentID) |
int |
getSegmentOffset(int segmentID) |
int |
getSegmentWidth(int segmentID) |
java.lang.Iterable<java.lang.Integer> |
getVisibleEdgeIDs() |
javax.swing.JComponent |
makePanel()
Returns the panel that represents this view in the GUI.
|
protected void |
processEvent(KahinaChartUpdateEvent e) |
void |
processEvent(KahinaEvent e) |
void |
recalculate()
Override this method to define necessary operations after changes to the
model (coordinate recomputations etc.)
|
boolean |
segmentDisplayed(int id) |
void |
setDisplayDecider(KahinaChartEdgeDisplayDecider displayDecider) |
void |
setMarkedEdge(int markedEdge) |
void |
setStatusAutoColorEncoding(int status,
java.awt.Color color)
Define the color encoding for a status.
|
void |
setStatusColorEncoding(int status,
java.awt.Color color)
Define the color of normal (non-highlighted) edges with a certain status.
|
void |
setStatusFontEncoding(int status,
java.awt.Font font) |
void |
setStatusHighlightColorEncoding(int status,
java.awt.Color color)
Define the color of highlighted edges with a certain status.
|
void |
updateHighlightings() |
display, doDisplay, getModel, getTitle, isVisible, makeEditorPanel, needsRedraw, processEvent, requireRedraw, setConfig, setTitle, setVisible
public KahinaChartView(KahinaInstance<?,?,?,?> kahina)
public KahinaChartView(KahinaChart chartModel, KahinaInstance<?,?,?,?> kahina)
public KahinaChartViewConfiguration getConfig()
getConfig
in class KahinaView<KahinaChart>
public void display(KahinaChart chartModel)
public void recalculate()
KahinaView
recalculate
in class KahinaView<KahinaChart>
public void setDisplayDecider(KahinaChartEdgeDisplayDecider displayDecider)
protected void computeSegmentOffsets()
public boolean segmentDisplayed(int id)
public int getNumberOfSegments()
public java.awt.Color getEdgeColor(int edgeID)
edgeID
- public java.awt.Color getEdgeHighlightColor(int edgeID)
edgeID
- public java.awt.Stroke getEdgeStroke(int edgeID)
public java.awt.Font getEdgeFont(int edgeID)
public java.lang.Iterable<java.lang.Integer> getEdgeIDs()
public java.lang.Iterable<java.lang.Integer> getVisibleEdgeIDs()
public int getEdgeX(int edgeID)
public int getEdgeY(int edgeID)
public int getEdgeHeight(int edgeID)
public int getEdgeWidth(int edgeID)
public java.lang.String getEdgeCaption(int edgeID)
public java.lang.String getSegmentCaption(int segmentID)
public int getSegmentOffset(int segmentID)
public java.awt.FontMetrics getFontMetrics(java.awt.Font f, java.awt.Stroke s, int fontSize)
public int getDisplayWidth()
public int getDisplayHeight()
public int getSegmentWidth(int segmentID)
public void setStatusColorEncoding(int status, java.awt.Color color)
status
- - the status the color will be assigned tocolor
- - the color for normal edges of that statuspublic void setStatusHighlightColorEncoding(int status, java.awt.Color color)
status
- - the status the color will be assigned tocolor
- - the color for highlighted edges of that statuspublic void setStatusAutoColorEncoding(int status, java.awt.Color color)
setStatusColorEncoding(int, Color)
and
setStatusHighlightColorEncoding(int, Color)
.status
- - the status the color will be assigned tocolor
- - the base color to encode the statuspublic void setStatusFontEncoding(int status, java.awt.Font font)
public int getMarkedEdge()
public void setMarkedEdge(int markedEdge)
public void updateHighlightings()
public int edgeAtCoordinates(int x, int y)
public javax.swing.JComponent makePanel()
KahinaView
makePanel
in class KahinaView<KahinaChart>
public void processEvent(KahinaEvent e)
processEvent
in interface KahinaListener
processEvent
in class KahinaView<KahinaChart>
protected void processEvent(KahinaChartUpdateEvent e)