edu.stanford.hci.r3.actions.types
Class DisplayGraphicsAction
java.lang.Object
edu.stanford.hci.r3.actions.types.DisplayGraphicsAction
- All Implemented Interfaces:
- R3Action
public class DisplayGraphicsAction
- extends java.lang.Object
- implements R3Action
Ideally, this is done with reflection, runtime class loading and compilation, etc. But, that's
crazy. And we're not gonna do it before the CHI deadline. =) In fact, let's do a little test and
try to serialize a JPanel and send it across the wire.
First, test this on a local ActionReceiver. =)
This software is distributed under the BSD License.
Nested Class Summary |
static class |
DisplayGraphicsAction.LocalDisplay
Regardless of where the graphics commands are sent, you need to eventually get a LOCAL
display and a LOCAL graphics object. |
Method Summary |
void |
drawImage(java.io.File imgFile,
int x,
int y)
|
void |
drawImage(java.io.File imgFile,
int x,
int y,
double scaleFactor)
|
void |
drawRect(int x,
int y,
int w,
int h)
|
void |
drawShape(java.awt.Shape s)
|
void |
fillRect(int x,
int y,
int w,
int h)
Queues up a fillRect... |
void |
invoke()
Causes the graphics commands to be displayed on our local device's display channel. |
void |
maximizeFrame()
|
void |
minimizeFrame()
|
void |
restoreFrame()
|
void |
setBringToFront(boolean flag)
|
void |
setColor(java.awt.Color col)
|
void |
setExitOnClose(boolean flag)
|
void |
setFrameLocation(java.awt.Point windowOrigin)
|
void |
setFrameSize(int w,
int h)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DisplayGraphicsAction
public DisplayGraphicsAction()
drawImage
public void drawImage(java.io.File imgFile,
int x,
int y)
- Parameters:
imgFile
- x
- y
-
drawImage
public void drawImage(java.io.File imgFile,
int x,
int y,
double scaleFactor)
- Parameters:
imgFile
- x
- y
- scaleFactor
-
drawRect
public void drawRect(int x,
int y,
int w,
int h)
- Parameters:
x
- y
- w
- h
-
drawShape
public void drawShape(java.awt.Shape s)
- Parameters:
s
-
fillRect
public void fillRect(int x,
int y,
int w,
int h)
- Queues up a fillRect...
- Parameters:
x
- y
- w
- h
-
invoke
public void invoke()
- Causes the graphics commands to be displayed on our local device's display channel.
- Specified by:
invoke
in interface R3Action
- See Also:
R3Action.invoke()
maximizeFrame
public void maximizeFrame()
minimizeFrame
public void minimizeFrame()
restoreFrame
public void restoreFrame()
setColor
public void setColor(java.awt.Color col)
- Parameters:
col
-
setExitOnClose
public void setExitOnClose(boolean flag)
- Parameters:
flag
-
setFrameLocation
public void setFrameLocation(java.awt.Point windowOrigin)
setFrameSize
public void setFrameSize(int w,
int h)
setBringToFront
public void setBringToFront(boolean flag)