BASE
- VIEW
- public final class CoolMapView<BASE,VIEW>
extends java.lang.Object
Constructor and Description |
---|
CoolMapView(CoolMapObject<BASE,VIEW> coolMapObject) |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
addColumnMap(ColumnMap map) |
void |
addCViewListener(CViewListener listener) |
void |
addMapLayer(MapLayer mapLayer) |
void |
addOverlayer(MapLayer overLayer) |
void |
addRowMap(RowMap map) |
void |
addSelection(java.util.Collection<java.awt.Rectangle> selections) |
void |
addSelection(java.awt.Rectangle selection) |
void |
centerColumns() |
void |
centerRows() |
void |
centerToColumn(VNode columnNode) |
void |
centerToNodes(VNode rowNode,
VNode colNode) |
void |
centerToPercentage(float colPercent,
float rowPercent) |
void |
centerToRegion(java.awt.Rectangle nodeRegion) |
void |
centerToRow(VNode rowNode) |
void |
centerToSelections() |
void |
clearSelection() |
java.util.Set<java.awt.Rectangle> |
convertNodeRegionToViewRegion(java.util.Set<java.awt.Rectangle> nodeRegions)
converts rectangles from node selection regions, to view plotting
regions, anchored at 0,0
|
void |
destroy() |
void |
deSyncAll()
deSync
|
void |
disablePropertyBasedAggregation() |
void |
enablePropertyBasedAggregation(PropertyBasedAggregation<VIEW> propertyBasedAggregation,
java.lang.String propertyBasedAggregationDirection) |
MatrixCell |
getActiveCell()
gets a copy of the active cell
|
static java.lang.Integer[] |
getAvailableSubHeatMapSize() |
java.awt.Rectangle |
getBounds() |
java.awt.Rectangle |
getCanvasDimension() |
SideMap |
getColumnMap(java.lang.String className) |
java.util.List<SideMap> |
getColumnMaps() |
CoolMapObject<BASE,VIEW> |
getCoolMapObject() |
java.lang.Integer |
getCurrentCol(int screenX) |
java.lang.Integer |
getCurrentColSearchAll(int screenX)
find the current Col using binary search -1 means left bound cols = right
bound, null = undefined
|
java.lang.Integer |
getCurrentRow(int screenY) |
java.lang.Integer |
getCurrentRowSearchAll(int screenY) |
java.awt.Point |
getMapAnchor()
get the anchoring point of the map all other node anchors are mapAnchor +
view offset
|
float |
getMapHeight() |
float |
getMapWidth() |
java.lang.Integer |
getMaxColInView()
max sub col, exclusive
|
java.lang.Integer |
getMaxRowInView()
max sub row, exclusive
|
java.lang.Integer |
getMinColInView() |
java.lang.Integer |
getMinRowInView()
returns the rectangle of viewport, anchors @ 0,0 returns the visible
viewport area
|
java.awt.Point |
getMouseXY()
get a copy of the current mouse location in view
|
int |
getNumberOfColumnsCanAccommodate() |
int |
getNumberOfRowsCanAccommodate() |
PropertyBasedAggregation<VIEW> |
getPropertyBasedAggregation() |
java.lang.String |
getPropertyBasedAggregationDirection() |
SideMap |
getRowMap(java.lang.String className) |
java.util.List<SideMap> |
getRowMaps() |
MatrixCell |
getSelectedCell() |
java.util.ArrayList<com.google.common.collect.Range<java.lang.Integer>> |
getSelectedColumns() |
java.util.ArrayList<com.google.common.collect.Range<java.lang.Integer>> |
getSelectedRows() |
java.util.Set<java.awt.Rectangle> |
getSelections() |
java.awt.Rectangle |
getSelectionsUnion()
returns the outer bounds of all selections
|
static int |
getSubHeatMapCellSize() |
java.awt.Rectangle |
getSubMapDimension()
returns the x,y,width,height of submapbuffer
|
javax.swing.JComponent |
getViewCanvas()
returns the JComponent that displays CoolMap
|
javax.swing.JInternalFrame |
getViewFrame() |
ZoomControl |
getZoomControlX() |
ZoomControl |
getZoomControlY() |
float |
getZoomX() |
float |
getZoomY() |
void |
highlightNodeRegions(java.util.Set<java.awt.Rectangle> nodeRegions) |
boolean |
isAntiAliased() |
boolean |
isCellSelected(int row,
int col) |
boolean |
isColumnPanelsVisible() |
boolean |
isDrawHover() |
boolean |
isIgnoreEmptyNodes() |
boolean |
isMaximized() |
boolean |
isMinimized() |
boolean |
isPropertyBasedAggregationEnabled() |
boolean |
isResizingCellEnabled() |
boolean |
isRowPanelsVisible() |
void |
moveColumnMapToBottom(ColumnMap columnMap) |
void |
moveMapBy(float offsetX,
float offsetY)
shift map by some offsets
|
void |
moveMapTo(float newX,
float newY) |
void |
moveRowMapToBottom(RowMap rowMap) |
void |
redrawCanvas()
repaint the entire canvas area
|
void |
removeColumnMap(SideMap columnMap) |
void |
removeCViewListener(CViewListener listener) |
void |
removeRowMap(SideMap rowMap) |
void |
resetNodeWidth()
reset the width and height of view nodes
|
void |
resetNodeWidthColumn() |
void |
resetNodeWidthRow() |
void |
setActiveCell(MatrixCell oldCell,
MatrixCell newCell) |
void |
setAntiAlias(boolean antiAlias) |
void |
setBounds(java.awt.Rectangle bounds) |
void |
setColumnPanelsVisible(boolean visible) |
void |
setDefaultKeyListenersEnabled(boolean enabled) |
void |
setDefaultMouseListenersEnabled(boolean enabled) |
static void |
setEnableHoverTooltip(boolean enabled) |
static void |
setEnableLabelTooltip(boolean enabled) |
static void |
setEnablePaintLabelAlongSelections(boolean enabled) |
static void |
setEnableSubHeatMap(boolean enabled) |
void |
setForceDrawHover(boolean draw)
force drawing hover whenever active row/column is valid
|
void |
setIgnoreEmptyNodes(boolean ignoreEmptyNodes) |
void |
setMaximize(boolean maximize)
Attempt to maximize view
|
void |
setMinimize(boolean minimize) |
void |
setMouseXY(int x,
int y) |
void |
setPopupMenu(javax.swing.JPopupMenu menu) |
void |
setResizingEnabled(boolean enabled) |
void |
setRowPanelsVisible(boolean visible) |
void |
setSelection(java.awt.Rectangle selection) |
void |
setSelectionRowIndices(java.util.Collection<java.lang.Integer> selectedIndices) |
void |
setSelections(java.util.Collection<java.awt.Rectangle> selections) |
void |
setSelectionsColumn(java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> selectedColumns) |
void |
setSelectionsColumnIndices(java.util.Collection<java.lang.Integer> selectedIndices) |
void |
setSelectionsRow(java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> selectedRows) |
static void |
setSubHeatMapSize(int newSize) |
void |
setSyncActiveCell(boolean activeCellSynced) |
void |
setSyncColumnSelection(boolean columnSelectionSynced) |
void |
setSyncMapAnchor(boolean anchorSynced) |
void |
setSyncRowSelection(boolean rowSelectionSynced) |
void |
setSyncZoom(boolean zoomSynced) |
void |
setZoomIndices(int xIndex,
int yIndex)
it will only work when the view is valid
|
void |
setZoomLevels(float zoomX,
float zoomY) |
void |
toggleResizingEnabled() |
void |
updateActiveCell() |
void |
updateCanvas(java.util.Set<java.awt.Rectangle> nodeRegions,
boolean forceUpdateAll,
boolean forceUpdateOverlay) |
void |
updateCanvasEnforceAll()
force to update everything note: if enforce all is called but
interrupted, next call to updates must be at least one full enforce all.
|
void |
updateCanvasEnforceOverlay()
update all if needed, but enforce update the overlay layer (respond to
selection change) if necessary
|
void |
updateCanvasIfNecessary()
update all when it's necessary
|
void |
updateColDrawerBounds() |
void |
updateColumnMapBuffersEnforceAll() |
void |
updateNodeDisplayParams()
must be called, when nodes are added, removed, reordered or resized
|
void |
updateRowDrawerBounds() |
void |
updateRowMapBuffersEnforceAll() |
boolean |
zoomIn(boolean zoomX,
boolean zoomY) |
boolean |
zoomOut(boolean zoomX,
boolean zoomY) |
public CoolMapView(CoolMapObject<BASE,VIEW> coolMapObject)
public PropertyBasedAggregation<VIEW> getPropertyBasedAggregation()
public java.lang.String getPropertyBasedAggregationDirection()
public void moveRowMapToBottom(RowMap rowMap)
public void removeRowMap(SideMap rowMap)
public void moveColumnMapToBottom(ColumnMap columnMap)
public void removeColumnMap(SideMap columnMap)
public void addColumnMap(ColumnMap map)
public SideMap getColumnMap(java.lang.String className)
public java.util.List<SideMap> getColumnMaps()
public java.util.List<SideMap> getRowMaps()
public SideMap getRowMap(java.lang.String className)
public void addRowMap(RowMap map)
public void addCViewListener(CViewListener listener)
public void removeCViewListener(CViewListener listener)
public boolean isResizingCellEnabled()
public void setRowPanelsVisible(boolean visible)
public void setColumnPanelsVisible(boolean visible)
public boolean isRowPanelsVisible()
public boolean isColumnPanelsVisible()
public void setPopupMenu(javax.swing.JPopupMenu menu)
public void destroy()
public java.util.ArrayList<com.google.common.collect.Range<java.lang.Integer>> getSelectedColumns()
public java.util.ArrayList<com.google.common.collect.Range<java.lang.Integer>> getSelectedRows()
public java.awt.Rectangle getSelectionsUnion()
public MatrixCell getActiveCell()
public float getZoomX()
public float getZoomY()
public ZoomControl getZoomControlX()
public ZoomControl getZoomControlY()
public CoolMapObject<BASE,VIEW> getCoolMapObject()
public void centerToSelections()
public void centerToRegion(java.awt.Rectangle nodeRegion)
public void centerToRow(VNode rowNode)
public void centerToColumn(VNode columnNode)
public void centerRows()
public void centerColumns()
public void centerToPercentage(float colPercent, float rowPercent)
public boolean zoomIn(boolean zoomX, boolean zoomY)
public void setZoomLevels(float zoomX, float zoomY)
public void setZoomIndices(int xIndex, int yIndex)
xIndex
- yIndex
- public boolean zoomOut(boolean zoomX, boolean zoomY)
public void setSelectionsColumnIndices(java.util.Collection<java.lang.Integer> selectedIndices)
public void setSelectionRowIndices(java.util.Collection<java.lang.Integer> selectedIndices)
public void setSelectionsColumn(java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> selectedColumns)
public void setSelectionsRow(java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> selectedRows)
public java.awt.Point getMapAnchor()
public float getMapWidth()
public float getMapHeight()
public void updateColDrawerBounds()
public void updateRowDrawerBounds()
public void addSelection(java.awt.Rectangle selection)
public boolean isCellSelected(int row, int col)
public void addSelection(java.util.Collection<java.awt.Rectangle> selections)
public void clearSelection()
public void setSelection(java.awt.Rectangle selection)
public void setSelections(java.util.Collection<java.awt.Rectangle> selections)
public java.util.Set<java.awt.Rectangle> getSelections()
public java.awt.Rectangle getCanvasDimension()
public void setResizingEnabled(boolean enabled)
public void toggleResizingEnabled()
public static void setEnableSubHeatMap(boolean enabled)
public static void setEnableHoverTooltip(boolean enabled)
public static void setEnableLabelTooltip(boolean enabled)
public void updateActiveCell()
public void setMouseXY(int x, int y)
public void setActiveCell(MatrixCell oldCell, MatrixCell newCell)
public java.lang.Integer getCurrentCol(int screenX)
public java.lang.Integer getCurrentColSearchAll(int screenX)
screenX
- public java.awt.Point getMouseXY()
public java.lang.Integer getCurrentRow(int screenY)
public java.lang.Integer getCurrentRowSearchAll(int screenY)
public void activate()
public void setAntiAlias(boolean antiAlias)
public void setMaximize(boolean maximize)
maximize
- public boolean isMaximized()
public boolean isMinimized()
public void setMinimize(boolean minimize)
public void setBounds(java.awt.Rectangle bounds)
public java.awt.Rectangle getBounds()
public javax.swing.JInternalFrame getViewFrame()
public javax.swing.JComponent getViewCanvas()
public java.lang.Integer getMinRowInView()
public java.lang.Integer getMinColInView()
public java.lang.Integer getMaxRowInView()
public java.lang.Integer getMaxColInView()
public boolean isAntiAliased()
public java.awt.Rectangle getSubMapDimension()
public int getNumberOfRowsCanAccommodate()
public int getNumberOfColumnsCanAccommodate()
public void updateNodeDisplayParams()
public void highlightNodeRegions(java.util.Set<java.awt.Rectangle> nodeRegions)
public void setDefaultMouseListenersEnabled(boolean enabled)
public void setDefaultKeyListenersEnabled(boolean enabled)
public void moveMapTo(float newX, float newY)
public void moveMapBy(float offsetX, float offsetY)
offsetX
- offsetY
- public void resetNodeWidth()
public void resetNodeWidthRow()
public void resetNodeWidthColumn()
public void updateCanvas(java.util.Set<java.awt.Rectangle> nodeRegions, boolean forceUpdateAll, boolean forceUpdateOverlay)
public java.util.Set<java.awt.Rectangle> convertNodeRegionToViewRegion(java.util.Set<java.awt.Rectangle> nodeRegions)
nodeRegions
- public void updateCanvasIfNecessary()
public void updateCanvasEnforceAll()
public void updateRowMapBuffersEnforceAll()
public void updateColumnMapBuffersEnforceAll()
public void updateCanvasEnforceOverlay()
not for selections, but for mask
public void redrawCanvas()
public void addMapLayer(MapLayer mapLayer)
public void addOverlayer(MapLayer overLayer)
public void setIgnoreEmptyNodes(boolean ignoreEmptyNodes)
public boolean isIgnoreEmptyNodes()
public MatrixCell getSelectedCell()
public void setSyncActiveCell(boolean activeCellSynced)
public void setSyncMapAnchor(boolean anchorSynced)
public void setSyncColumnSelection(boolean columnSelectionSynced)
public void setSyncRowSelection(boolean rowSelectionSynced)
public void setSyncZoom(boolean zoomSynced)
public void deSyncAll()
public void setForceDrawHover(boolean draw)
draw
- public boolean isDrawHover()
public boolean isPropertyBasedAggregationEnabled()
public void enablePropertyBasedAggregation(PropertyBasedAggregation<VIEW> propertyBasedAggregation, java.lang.String propertyBasedAggregationDirection)
public void disablePropertyBasedAggregation()
public static void setEnablePaintLabelAlongSelections(boolean enabled)
public static void setSubHeatMapSize(int newSize)
public static java.lang.Integer[] getAvailableSubHeatMapSize()
public static int getSubHeatMapCellSize()