public class HeadlessGraphicsProgram extends Object implements GraphicsProgramInterface
Constructor and Description |
---|
HeadlessGraphicsProgram() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component comp,
double x,
double y) |
void |
add(Component comp,
GPoint pt) |
void |
add(GObject gobj) |
void |
add(GObject gobj,
double x,
double y) |
void |
add(GObject gobj,
GPoint pt) |
void |
addKeyListeners() |
void |
addKeyListeners(KeyListener listener) |
void |
addMouseListeners() |
void |
addMouseListeners(EventListener listener) |
void |
clear() |
void |
clearCanvas() |
void |
exit() |
void |
fakeMouseClicked(int x,
int y) |
void |
fakeMouseDragged(int x,
int y) |
void |
fakeMouseDragSequence(int... coords) |
void |
fakeMouseMoved(int x,
int y) |
void |
fakeMousePressed(int x,
int y) |
void |
fakeMouseReleased(int x,
int y) |
Color |
getBackground() |
double |
getCanvasHeight() |
Dimension |
getCanvasSize() |
double |
getCanvasWidth() |
<T extends GObject> |
getElement(int index) |
<T extends GObject> |
getElementAt(double... coords) |
<T extends GObject> |
getElementAt(double x,
double y) |
<T extends GObject> |
getElementAt(GPoint pt) |
int |
getElementCount() |
Font |
getFont() |
GCanvas |
getGCanvas() |
int |
getHeight() |
static String |
getSaveFile() |
Dimension |
getSize() |
String |
getTitle() |
int |
getWidth() |
boolean |
hasElementAt(double... coords) |
boolean |
hasElementAt(double x,
double y) |
void |
init() |
boolean |
isAntiAliasing() |
Iterator<GObject> |
iterator() |
Iterator<GObject> |
iterator(int direction) |
void |
main(String[] args) |
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
pause(double milliseconds) |
void |
print(Object value) |
void |
print(String value) |
void |
printf(String format,
Object... args) |
void |
println() |
void |
println(Object value) |
void |
println(String value) |
void |
remove(double x,
double y) |
void |
remove(GObject gobj) |
void |
remove(GPoint pt) |
void |
removeAll() |
void |
removeAll(double... coords) |
void |
removeAll(double x,
double y) |
void |
removeAll(GPoint pt) |
void |
removeAllComponents() |
void |
repaint() |
void |
run() |
void |
save() |
static void |
setAntiAliasDefault(boolean antialias) |
void |
setAntiAliasing(boolean antialias) |
void |
setBackground(Color bg) |
void |
setCanvasHeight(double height) |
void |
setCanvasSize(double width,
double height) |
void |
setCanvasWidth(double width) |
void |
setFont(Font font) |
void |
setParameterTable(Map<String,String> table) |
static void |
setSaveFile(String filename) |
void |
setShowPixelInfo(boolean show) |
void |
setSize(Dimension size) |
void |
setSize(double width,
double height) |
void |
setStartupObject(Object obj) |
void |
setTitle(String title) |
void |
setWindowSize(double width,
double height) |
void |
start() |
void |
start(String[] args) |
BufferedImage |
toImage() |
void |
waitForClick() |
public static String getSaveFile()
public static void setAntiAliasDefault(boolean antialias)
public static void setSaveFile(String filename)
public final void main(String[] args)
public final void exit()
exit
in interface ProgramInterface
public void init()
init
in interface ProgramInterface
public void run()
run
in interface ProgramInterface
public final void save()
public void setParameterTable(Map<String,String> table)
setParameterTable
in interface ProgramInterface
public void setStartupObject(Object obj)
setStartupObject
in interface ProgramInterface
public void start()
start
in interface ProgramInterface
public void start(String[] args)
start
in interface ProgramInterface
public void fakeMouseClicked(int x, int y)
public void fakeMousePressed(int x, int y)
public void fakeMouseReleased(int x, int y)
public void fakeMouseMoved(int x, int y)
public void fakeMouseDragged(int x, int y)
public void fakeMouseDragSequence(int... coords)
public void add(GObject gobj)
add
in interface GCanvasInterface
public void add(GObject gobj, double x, double y)
add
in interface GCanvasInterface
public void add(GObject gobj, GPoint pt)
add
in interface GCanvasInterface
public void add(Component comp, double x, double y)
add
in interface GCanvasInterface
public void add(Component comp, GPoint pt)
add
in interface GCanvasInterface
public void clear()
clear
in interface GCanvasInterface
public Color getBackground()
getBackground
in interface GCanvasInterface
public int getElementCount()
getElementCount
in interface GCanvasInterface
public <T extends GObject> T getElement(int index)
getElement
in interface GCanvasInterface
public <T extends GObject> T getElementAt(double x, double y)
getElementAt
in interface GCanvasInterface
public <T extends GObject> T getElementAt(double... coords)
getElementAt
in interface GCanvasInterface
public <T extends GObject> T getElementAt(GPoint pt)
getElementAt
in interface GCanvasInterface
public Font getFont()
getFont
in interface GCanvasInterface
public boolean hasElementAt(double x, double y)
hasElementAt
in interface GCanvasInterface
public boolean hasElementAt(double... coords)
hasElementAt
in interface GCanvasInterface
public boolean isAntiAliasing()
isAntiAliasing
in interface GCanvasInterface
public Iterator<GObject> iterator()
iterator
in interface GCanvasInterface
public Iterator<GObject> iterator(int direction)
iterator
in interface GCanvasInterface
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void remove(double x, double y)
remove
in interface GCanvasInterface
public void remove(GPoint pt)
remove
in interface GCanvasInterface
public void remove(GObject gobj)
remove
in interface GCanvasInterface
public void removeAll()
removeAll
in interface GCanvasInterface
public void removeAll(double x, double y)
removeAll
in interface GCanvasInterface
public void removeAll(double... coords)
removeAll
in interface GCanvasInterface
public void removeAll(GPoint pt)
removeAll
in interface GCanvasInterface
public void repaint()
repaint
in interface GCanvasInterface
public void setAntiAliasing(boolean antialias)
setAntiAliasing
in interface GCanvasInterface
public void setBackground(Color bg)
setBackground
in interface GCanvasInterface
public void setShowPixelInfo(boolean show)
setShowPixelInfo
in interface GCanvasInterface
public BufferedImage toImage()
toImage
in interface GCanvasInterface
public void addKeyListeners()
addKeyListeners
in interface GraphicsProgramInterface
public void addKeyListeners(KeyListener listener)
addKeyListeners
in interface GraphicsProgramInterface
public void addMouseListeners()
addMouseListeners
in interface GraphicsProgramInterface
public void addMouseListeners(EventListener listener)
addMouseListeners
in interface GraphicsProgramInterface
public void clearCanvas()
clearCanvas
in interface GraphicsProgramInterface
public int getHeight()
getHeight
in interface GCanvasInterface
public Dimension getSize()
getSize
in interface GCanvasInterface
public int getWidth()
getWidth
in interface GCanvasInterface
public double getCanvasHeight()
getCanvasHeight
in interface GraphicsProgramInterface
public Dimension getCanvasSize()
getCanvasSize
in interface GraphicsProgramInterface
public double getCanvasWidth()
getCanvasWidth
in interface GraphicsProgramInterface
public GCanvas getGCanvas()
getGCanvas
in interface GraphicsProgramInterface
public void pause(double milliseconds)
pause
in interface ProgramInterface
public void removeAllComponents()
removeAllComponents
in interface GraphicsProgramInterface
public void setCanvasHeight(double height)
setCanvasHeight
in interface GraphicsProgramInterface
public void setCanvasSize(double width, double height)
setCanvasSize
in interface GraphicsProgramInterface
public void setCanvasWidth(double width)
setCanvasWidth
in interface GraphicsProgramInterface
public void setFont(Font font)
setFont
in interface GCanvasInterface
public void setSize(Dimension size)
setSize
in interface GCanvasInterface
public void setSize(double width, double height)
setSize
in interface GraphicsProgramInterface
public void setWindowSize(double width, double height)
setWindowSize
in interface GraphicsProgramInterface
public void waitForClick()
waitForClick
in interface GraphicsProgramInterface
public String getTitle()
getTitle
in interface ProgramInterface
public void print(Object value)
print
in interface ProgramInterface
public void print(String value)
print
in interface ProgramInterface
public void printf(String format, Object... args)
printf
in interface ProgramInterface
public void println()
println
in interface ProgramInterface
public void println(Object value)
println
in interface ProgramInterface
public void println(String value)
println
in interface ProgramInterface
public void setTitle(String title)
setTitle
in interface ProgramInterface