|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.insightful.gdevice.SCanvasPaneController
public class SCanvasPaneController
An SCanvasPaneController object coordinates the display and UI logic for a multi-page canvas display. The actual UI elements are represented by an SCanvasPaneView object. The separation is done so that the same display/UI logic can be used with either heavy-weight AWT objects (in an applet) or Swing objects (in the Splus GUI).
Nested Class Summary | |
---|---|
static interface |
SCanvasPaneController.ContextMenuAccess
|
static interface |
SCanvasPaneController.EmbeddedFileAccess
|
Field Summary | |
---|---|
protected Color |
m_backgroundColor
if non-null, used as the background color for all canvases. |
protected boolean |
m_bXorSelectedRegions
Whether to XOR the highlight color with the graph to highlight selected regions. |
protected Color |
m_clrSelectionHighlight
Color for highlighting selected regions. |
protected boolean |
m_debug
|
static boolean |
m_debugFirehose
|
static int |
m_debugFirehoseCheckSleep
|
static int |
m_debugFirehosePaintCount
|
protected boolean |
m_highlightOutline
|
protected boolean |
m_showQueryErrorDialog
Whether to pop up a message box if a network error prevents a query to a web service. |
protected com.insightful.gdevice.TagSet |
m_tagset
Tags of the selected rectangles. |
Constructor Summary | |
---|---|
SCanvasPaneController(SCanvasPaneView view)
|
Method Summary | |
---|---|
void |
addCanvas(SCanvasAWT canvas)
|
void |
addCanvas(SCanvasAWT canvas,
int index)
|
void |
addSelectedTag(String tag)
|
void |
addSelectedTagArray(String[] tagArray)
|
protected void |
callOnSelectChanged()
|
void |
clearSelectedTags()
|
void |
clearSetSelectedTag(String tag)
|
void |
clearSetSelectedTagArray(String[] tagArray)
|
protected boolean |
collectMenuInfo(XMLElement elt,
STreeNode rootLabels,
STreeNode rootActions)
Parses the XML for a menu and store the label and action information in tree structures for later use to construct the actual menu. |
boolean |
doContextMenu(int x,
int y)
|
void |
doExec(SCanvasPaneView view,
String code,
String language)
|
void |
doHitAction(String action)
|
void |
doHitAction(String action,
int x,
int y,
boolean bControlDown,
boolean bShiftDown)
Handles a mouse hit on an active region. |
void |
doHitAction(String action,
int x,
int y,
boolean bLeft,
boolean bMiddle,
boolean bRight,
boolean bControlDown,
boolean bShiftDown)
Handles a mouse hit on an active region. |
void |
doHitAction(XMLElement elt,
String action,
int x,
int y,
boolean bLeft,
boolean bMiddle,
boolean bRight,
boolean bControlDown,
boolean bShiftDown)
|
void |
doHitMenu(SCanvasPaneView view,
STreeNode rootLabels,
STreeNode rootActions,
int x,
int y)
|
boolean |
doHitQueryWebService(SCanvasPaneView view,
XMLElement elt,
STreeNode rootLabels,
STreeNode rootActions,
boolean bShowErrorDialog)
added methods to handle SCanvasPaneView2 methods. |
protected void |
doHitSelect(String strTag,
boolean bControlDown,
boolean bShiftDown)
Selects the active region receiving the mouse hit. |
protected void |
doHitSelect(String strTag,
String selectOp,
boolean bControlDown,
boolean bShiftDown)
Selects the active region receiving the mouse hit, according to the value of selectOp: If selectOp is "KEY", add or toggle the region, depending on the control and shift keys: If the SHIFT key is down, the method adds the region's tag to the tag set. |
static Color |
getAnnotationColor(com.insightful.gdevice.SCanvasPaneController.CanvasPage page)
|
static int |
getAnnotationTextColor()
|
boolean |
getAutoZoom()
|
static boolean |
getBackgroundBorders()
Returns whether to display borders around graph with graph background color, or gray. |
Color |
getBackgroundColor()
|
SCanvasAWT |
getCanvas()
|
SCanvasAWT |
getCanvas(int i)
|
Dimension |
getCanvasComponentSize()
|
Point |
getCanvasPointFromMouse(Point pt)
|
int |
getCurrentPageNumber()
|
String |
getCurrentPageTagName()
|
boolean |
getDebug()
|
boolean |
getHighlightOutline()
|
static int |
getLocatorFractionDigits()
Returns the number of digits that will be printed after the decimal point when displaying the mouse position. |
int |
getNumberPages()
|
int |
getSelectedTab()
|
String[] |
getSelectedTags()
Returns the tags of the selected rectangles, if any. |
SCanvasRectangle |
getSelectionRect()
|
boolean |
getSelectionRectControlDown()
|
boolean |
getSelectionRectShiftDown()
|
static boolean |
getShowActiveRegions()
|
static boolean |
getShowMouseLocation()
|
int |
getTabCount()
|
int |
getTabNumber(int x,
int y)
|
int |
getTabNumberFromTagName(String tag)
|
String |
getTabTag(int i)
|
String |
getTabTagName(int i)
|
String |
getTabTitle(int i)
|
String[] |
getTagsInRect(SCanvasRectangle rect)
|
SCanvasPaneView |
getView()
|
double |
getZoom()
|
protected void |
invalidateAllSelectionImages()
Throws away all buffered images in which selected active regions are highlighted. |
boolean |
isSelectedTag(String tag)
|
void |
paintCanvas(Graphics g)
Paints the main canvas. |
void |
paintTabs(Graphics g)
|
void |
printCanvas(Graphics g)
Prints the main canvas. |
void |
printPage(int index,
Graphics g,
Dimension printPageSize,
boolean printAll,
boolean printSelections)
print one page to a printer with a given page size. |
void |
printPage(int index,
Graphics g,
Dimension printPageSize,
boolean printAll,
boolean printSelections,
boolean indentRegion)
|
void |
printTabs(Graphics g)
|
void |
printTabsApplet(Graphics g)
|
void |
releaseMemory()
|
void |
removeAllPages()
|
void |
removeSelectedTag(String tag)
|
void |
removeTabAt(int index)
|
void |
retrieveEmbeddedSPJFile()
Get embedded SPJ file for current canvas, if this is in an applet, and the canvas has an embedded file specified. |
void |
selectRect()
|
static void |
setAnnotationTextColor(int val)
|
void |
setAutoZoom(boolean newVal)
|
static void |
setBackgroundBorders(boolean backgroundBorders)
Sets the m_backgroundBorders flag that determines whether to display borders around graph with graph background color, or gray. |
void |
setBackgroundColor(Color col)
|
void |
setCurrentPageBack()
|
void |
setCurrentPageByNumber(int num)
|
void |
setCurrentPageByTagName(String tag)
|
void |
setCurrentPageForward()
|
void |
setDebug(boolean val)
|
static void |
setDebugFirehose(boolean val)
|
static void |
setDebugFirehoseCheckSleep(int val)
|
void |
setHighlightOutline(boolean val)
|
static void |
setLabelColor(Color col)
|
static void |
setLocatorFractionDigits(int val)
Sets the number of digits that will be printed after the decimal point when displaying the mouse position. |
void |
setSelectedTab(int i)
|
void |
setSelectedTabBack()
|
void |
setSelectedTabForward()
|
void |
setSelectedTags(String[] tags)
Sets the tags of the selected rectangles. |
void |
setSelectionHighlightColor(Color col)
Sets the color for highlighting selected regions. |
void |
setSelectionHighlightMode(String strMode)
Sets the drawing mode for highlighting selected active regions. |
void |
setSelectionRect(SCanvasRectangle rect)
|
void |
setSelectionRectControlDown(boolean val)
|
void |
setSelectionRectShiftDown(boolean val)
|
static void |
setShowActiveRegions(boolean val)
|
static void |
setShowMouseLocation(boolean val)
|
void |
setTabTag(int i,
String tag)
|
void |
setTabTitle(int i,
String title)
|
void |
setZoom(double val)
|
void |
setZoomToRect(SCanvasRectangle rect)
|
void |
showSelectedTab()
|
void |
toggleSelectedTag(String tag)
|
void |
toggleSelectedTagArray(String[] tagArray)
|
void |
updateCanvas()
|
void |
updateCanvas(int i)
|
void |
updateTabs()
|
void |
zoom(double zoomFactor)
|
void |
zoomToRect()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean m_showQueryErrorDialog
protected Color m_clrSelectionHighlight
protected boolean m_bXorSelectedRegions
protected Color m_backgroundColor
protected boolean m_highlightOutline
protected boolean m_debug
protected com.insightful.gdevice.TagSet m_tagset
public static boolean m_debugFirehose
public static int m_debugFirehosePaintCount
public static int m_debugFirehoseCheckSleep
Constructor Detail |
---|
public SCanvasPaneController(SCanvasPaneView view)
Method Detail |
---|
public void setSelectionHighlightColor(Color col)
public void setSelectionHighlightMode(String strMode)
strMode
- The new selection highlight drawing mode.
The value is case insensitive. If the value is
"paint", the drawing mode is set to paint mode;
otherwise it is set to XOR mode.public void setBackgroundColor(Color col)
public Color getBackgroundColor()
public static boolean getBackgroundBorders()
public static void setBackgroundBorders(boolean backgroundBorders)
public static int getLocatorFractionDigits()
public static void setLocatorFractionDigits(int val)
public static boolean getShowMouseLocation()
public static void setShowMouseLocation(boolean val)
public static boolean getShowActiveRegions()
public static void setShowActiveRegions(boolean val)
public static int getAnnotationTextColor()
public static void setAnnotationTextColor(int val)
public static void setLabelColor(Color col)
public static Color getAnnotationColor(com.insightful.gdevice.SCanvasPaneController.CanvasPage page)
public boolean getHighlightOutline()
public void setHighlightOutline(boolean val)
public boolean getDebug()
public void setDebug(boolean val)
public SCanvasPaneView getView()
public void paintCanvas(Graphics g)
g
- Graphics device.SCanvasPaneController.CanvasComponentListener#paint
public void printCanvas(Graphics g)
g
- Graphics device.SCanvasPaneController.CanvasComponentListener#print
public void paintTabs(Graphics g)
public void printTabs(Graphics g)
public void printTabsApplet(Graphics g)
public int getTabNumberFromTagName(String tag)
public int getTabNumber(int x, int y)
public void setSelectedTab(int i)
public void setSelectedTabBack()
public void setSelectedTabForward()
public void showSelectedTab()
public int getSelectedTab()
public int getTabCount()
public void removeTabAt(int index)
public String getTabTitle(int i)
public String getTabTagName(int i)
public String getTabTag(int i)
public void setTabTitle(int i, String title)
public void setTabTag(int i, String tag)
public void zoom(double zoomFactor)
public void zoomToRect()
public void selectRect()
public void updateTabs()
public void updateCanvas(int i)
public void updateCanvas()
public SCanvasAWT getCanvas(int i)
public SCanvasAWT getCanvas()
public void releaseMemory()
public void doHitAction(String action)
public void doHitAction(String action, int x, int y, boolean bControlDown, boolean bShiftDown)
public void doHitAction(String action, int x, int y, boolean bLeft, boolean bMiddle, boolean bRight, boolean bControlDown, boolean bShiftDown)
public void doHitAction(XMLElement elt, String action, int x, int y, boolean bLeft, boolean bMiddle, boolean bRight, boolean bControlDown, boolean bShiftDown)
public boolean doContextMenu(int x, int y)
public boolean doHitQueryWebService(SCanvasPaneView view, XMLElement elt, STreeNode rootLabels, STreeNode rootActions, boolean bShowErrorDialog) throws Exception
Exception
public void doHitMenu(SCanvasPaneView view, STreeNode rootLabels, STreeNode rootActions, int x, int y)
public void doExec(SCanvasPaneView view, String code, String language)
protected boolean collectMenuInfo(XMLElement elt, STreeNode rootLabels, STreeNode rootActions) throws Exception
Exception
protected void doHitSelect(String strTag, boolean bControlDown, boolean bShiftDown)
strTag
- Tag of the selectable active region clicked.bControlDown
- Whether the CTRL key was down.bShiftDown
- Whether the SHIFT key was down.protected void doHitSelect(String strTag, String selectOp, boolean bControlDown, boolean bShiftDown)
strTag
- Tag of the selectable active region clicked.selectOp
- select operation.bControlDown
- Whether the CTRL key was down.bShiftDown
- Whether the SHIFT key was down.public Dimension getCanvasComponentSize()
public void addCanvas(SCanvasAWT canvas)
public void addCanvas(SCanvasAWT canvas, int index)
public Point getCanvasPointFromMouse(Point pt)
public void setAutoZoom(boolean newVal)
public boolean getAutoZoom()
public void removeAllPages()
protected void invalidateAllSelectionImages()
public String[] getSelectedTags()
public void setSelectedTags(String[] tags)
tags
- array of tags.public void clearSelectedTags()
public void addSelectedTag(String tag)
public void clearSetSelectedTag(String tag)
public void removeSelectedTag(String tag)
public void toggleSelectedTag(String tag)
public void toggleSelectedTagArray(String[] tagArray)
public void addSelectedTagArray(String[] tagArray)
public void clearSetSelectedTagArray(String[] tagArray)
protected void callOnSelectChanged()
public boolean isSelectedTag(String tag)
public String getCurrentPageTagName()
public int getCurrentPageNumber()
public int getNumberPages()
public void setCurrentPageByTagName(String tag)
public void setCurrentPageByNumber(int num)
public void setCurrentPageBack()
public void setCurrentPageForward()
public void printPage(int index, Graphics g, Dimension printPageSize, boolean printAll, boolean printSelections)
public void printPage(int index, Graphics g, Dimension printPageSize, boolean printAll, boolean printSelections, boolean indentRegion)
public void retrieveEmbeddedSPJFile()
public double getZoom()
public void setZoom(double val)
public void setZoomToRect(SCanvasRectangle rect)
public SCanvasRectangle getSelectionRect()
public void setSelectionRect(SCanvasRectangle rect)
public boolean getSelectionRectShiftDown()
public void setSelectionRectShiftDown(boolean val)
public boolean getSelectionRectControlDown()
public void setSelectionRectControlDown(boolean val)
public String[] getTagsInRect(SCanvasRectangle rect)
public static void setDebugFirehose(boolean val)
public static void setDebugFirehoseCheckSleep(int val)
|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |