Registers an GGBorderListener so that the callback method nearBorder() is called
when the actor's location is on a cell at the border of the game grid.
Creates a card instance from given deck using the give card number
Keep in mind that the current card actor is undefined (null) until the
card is displayed in the gamegrid using the hand's draw() method
or attributeActor() is called.
Creates a transformed card cover actor from the seed actor of the
first card in the given deck and adds it at the given location to
the given game grid.
Same as CardGame(width, height, bgColor, statusHeight, simulationPeriod)
with bgColor = RGB(20, 80, 0) (dark green), simulationPeriod = 30
and statusHeight = 0 (no status bar).
Increases the current double displace position in the
current direction to the given double distance and moves the actor
in the cell that contains the given coordinates.
Constructs a game window including a playground of 10 by 10 cells (60 pixels wide)
with possibly a navigation bar and a visible red grid but no background image.
Constructs a game window including a playground with possibly a
navigation bar, possibly a visible grid, possibly a background image
and possibly no decoration.
Constructs a game window including a playground with possibly a
navigation bar, possibly a visible grid, possibly a background image and
and possibly no decoration.
Gets the adjacent location of a cell where a displacement arrow from the
current center of the current cell with given direction and
length = (distance + epsilon) * cellSize ends up.
Returns the current center of tile at given map location with respect
to the playground coordinate system (origin at upper left vertex,
x-coordinate to the left, y-coordinate downwards).
Returns all collision candidates who belongs to a given class whose collision areas
of the image with given sprite id intersects the circle with specified radius.
Retrieves the image either from the jar resource, from local drive or
from a internet server
From the given filename the image file is searched in the following order:
- if application is packed into a jar archive, relative to the root of the jar archive
- relative to the directory <userhome>/gamegrid/
- relative or absolute to current application directory
- if filename starts with http://, from the given URL
- add prefix _ and search relative to the root of the jar archive
Returns current position of upper left vertex with respect to the
playground coordinate system (origin at upper left vertex, x-coordinate to the left,
y-coordinate downwards).
Returns the rank name as string for the given card number
The cards are numbered from 0 in the suit and rank priority order given when
the deck is created (the following numbering is used: all card from high
to low rank of the cards in the highest priority suit, in the next suit, etc.)
Retrieves the image either from the jar resource, from local drive or
from a internet server and transforms it by scaling it by the given
factor and rotating it by the given angle.
Returns a list with actor references of all actors of the given class whose
touched area (of type IMAGE, RECTANGLE or CIRCLE) intersects with the current mouse
cursor location.
Returns the current coordinates of the upper left vertex of tile at given
map location with respect to the playground coordinate system (origin
at upper left vertex, x-coordinate to the left, y-coordinate downwards).
Simple graphics window of similar to GPanel to be used as component in a
top-level window (JFrame, JDialog, Browswer window, etc.) using a
coordinate system with x-axis from left to right, y-axis from bottom to top
(called window coordinates, default range 0..1, 0..1).
GPane() -
Constructor for class ch.aplu.util.GPane
Create a GPane to be used as embedded graphics component with default size 100x100 pixels.
Simple graphics window of default size 501x501 pixels (client drawing area)
using a coordinate system with x-axis from left to right, y-axis from bottom to top
(called window coordinates, default range 0..1, 0..1).
Same as halt(), but if exit = false clicking the title bar's close
button acts the same as clicking the Quit button
(System.exit(0) will not be called anymore).
init() -
Static method in class ch.aplu.util.Console
If no console was created before, create a new Console instance
with default attributes and returns a reference to it; otherwise
return the existing Console reference and show the exiting console
window if it was hidden (content is erased).
If no console was created before, create a new Console instance
with given position and size and returns a reference to it; otherwise
return the existing Console reference and show the exiting console window
with new position and size.
If no console was created before, create a new Console instance
with given font and returns a reference to it; otherwise
return the existing Console reference and use the given font.
If no console was created before, create a new Console instance
with given position, size, font and returns a reference to it; otherwise
return the existing Console reference and use the position, size and font.
If in aplu_util.properties the MessagePaneClosingMode key is set to
DisposeOnClose, the dialog is disposed when the close
title button is clicked and this method returns true
Return true, if in aplu_util.properties the ModelessOptionPaneClosingMode
key is set to DisposeOnClose and the close button is clicked or after
dispose() is called.
Main contains a public static void main() entry point and is
able to create an instance of another class (by Java reflection), so that its
default contructor is invoked.
Main contains a public static void main() entry point and is
able to create an instance of another class (by Java reflection), so that its
default contructor is invoked.
General constructor that show a modeless message dialog at given
position (upper left corner) containing given text and given
icon image (gif or jpg). iconUrl is the URL for the icon resource.
For a small grid (total number of cells <= 2500 = 50 * 50)
moves to one of 8 neighbour cells in the current direction (compass directions 45 degrees wide).
Loads a binary resource from the application JAR file, e.g. get
a BufferedImage reference from a image resource with bi = ImageIO.read(openResource(path)).
Loads a binary resource from the application JAR file, e.g. get
a BufferedImage reference from a image resource with bi = ImageIO.read(openResource(path)).
Pad given number with trailing spaces to optain decimal width and
right justify in a field with the given width
(pad the the field with leading spaces).
Same as quit(), but if exit = false clicking the title bar's close
button acts the same as clicking the Quit button
(System.exit(0) will not be called anymore).
Puts the given actor at first place in the corresponding scene list,
in order to act last and to be drawn on the bottom of other actors
of the same class.
Sets the current end direction to the given end direction
For negative endDir, the angle distance between cards is fixed to
the absolute value of this parameter.
Sets the tile image of the tile with given map location.In order the image
fits exactly on the tile, its size in number of pixels should be
tileHeight x tileWidth given when constructing the tile map.
Puts the given class prior to the ToolBarItem class in the paint order,
so that actors from the given class are painted on top of tool bar item images.
Puts the ToolBarItem class prior to the given class in the paint order,
so that the tool bar item images are painted on top of actors from the given class.
Sets the current position of the upper left vertex with respect to the
playground coordinate system (origin at upper left vertex, x-coordinate to the left,
y-coordinate downwards).
If the card is added to the GameGrid, handless and visible, moves
the card actor from current location to
the given location using the given number of steps per GameGrid's
simulation cycle.