| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
It's main goal is to provide access to Elate's unique window features and also, by allowing the programmer to manipulate the pixel map directly in memory, gain considerable performance increases over the traditional java Frame class.
In the simplest case, an
AmigaFrame window can be constructed and displayed on screen with the following
code:
| Field Summary | |
| byte[] | pix_b |
| short[] | pix_s |
| int[] | pix_i |
| static final String | VERSION |
| static final int | FDI_BORDER |
| static final int | FDI_TITLE |
| static final int | FDI_CONTENT |
| static final int | FDI_CLOSE |
| static final int | FDI_MIN |
| static final int | FDI_MAX |
| static final int | FDI_DRAG |
| static final int | FDI_RESIZE |
| static final int | FDI_INNER |
| static final int | FAVO_HIDDEN |
| static final int | FAVO_ALPHA |
| static final int | FAVO_ROOTPIX |
| static final int | FAVO_INTERACTIVE |
| static final int | FAVO_TRIG |
| static final int | FAVO_COMMON |
| static final int | FAVO_OPAQUE |
| static final int | FAVO_RECPATCH |
| static final int | FAVO_PERSIST |
| static final int | FAVO_BLOCKING |
| static final int | FAVO_RECURSIVE |
| Constructor Summary | |
| AmigaFrame(String
title,
int width, int height, int pixDepth, byte[]
pix_b, int flags)
Create a new, initially invisible AmigaFrame. |
|
| AmigaFrame(String
title,
int width, int height, int pixDepth, short[]
pix_s, int flags)
Create a new, initially invisible AmigaFrame. |
|
| AmigaFrame(String
title,
int width, int height, int pixDepth, int[]
pix_i, int flags)
Create a new, initially invisible AmigaFrame. |
|
| Method Summary | |
| boolean | contains(int
x,
int
y)
Checks whether the frame "contains" the specified point. |
| boolean | contains(Point
p)
Checks whether the frame "contains" the specified point. |
| void | dispose()
Disposes of the Frame. |
| Rectangle | getBounds()
Gets the bounds of this component in the form of a Rectangle object. |
| Point | getLocation()
Gets the location of this component in the form of a point specifying the component's top-left corner. |
| Point | getLocationOnScreen()
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space. |
| Dimension | getMaximumSize()
Gets the maximum size of this frame. |
| Dimension | getMinimumSize()
Gets the minimum size of this frame. |
| String | getName()
Gets the name of the component. |
| Dimension | getPreferredSize()
Gets the preferred size of this frame. |
| Dimension | getSize()
Returns the size of this frame in the form of a Dimension object. |
| String | getTitle()
Gets the title of the frame. |
| boolean | isClosed()
Tells if the frame is closed. |
| void | repaint()
Updates the frame's pixmap. |
| void | setBounds(int
x,
int
y,
int
width,
int
height)
Moves and resizes this frame. |
| void | setBounds(Rectangle
r)
Moves and resizes this frame to conform to the new bounding rectangle r. |
| void | setPixFlags(int
flags,
int
mask)
Sets the pixelmap's flags. |
| void | setLocation(int
x,
int
y)
Moves this frame to a new location. |
| void | setLocation(Point
p)
Moves this frame to a new location. |
| void | setName(String
name)
Sets the name of the frame to the specified string. |
| void | setSize(int
width,
int
width)
Resizes this frame to the given values. |
| void | setSize(Dimension
d)
Resizes this frame so that it has width d.width and height d.height. |
| void | show()
Draws the component on the screen. |
| Field Detail |
pix_b
public byte[] pix_b
A byte array for a 1,4 or 8 bit pixmap, provides direct
access to this frame's pixel buffer. Memory is assumed to have been allocated
prior to the constructor call.
pix_s
public short[] pix_s
A short array for a 12, 15 or 16 bit pixmap,
provides direct access to this frame's pixel buffer. Memory is assumed
to have been allocated prior to the constructor call.
pix_i
public int[] pix_i
An integer array for a 24 or 32 bit pixmap, provides direct
access to this frame's pixel buffer. Memory is assumed to have been allocated
prior to the constructor call.
VERSION
public static final String VERSION
The version number of this distribution of the AmigaFrame class.
FDI_BORDER
public static final int FDI_BORDER
Border gadget flag.
FDI_TITLE
public static final int FDI_TITLE
Title gadget flag.
FDI_CONTENT
public static final int FDI_CONTENT
Content gadget flag.
FDI_CLOSE
public static final int FDI_CLOSE
Close button flag.
FDI_MIN
public static final int FDI_MIN
Minimize button flag.
FDI_MAX
public static final int FDI_MAX
Maximize button flag.
FDI_DRAG
public static final int FDI_DRAG
Dragable flag.
FDI_RESIZE
public static final int FDI_RESIZE
Resizable flag.
FDI_INNER
public static final int FDI_INNER
Inner area size.
FAVO_HIDDEN
public static final int FDI_HIDDEN
AVO hidden flag.
FAVO_ALPHA
public static final int FDI_ALPHA
AVO alpha flag.
FAVO_ROOTPIX
public static final int FDI_ROOTPIX
AVO rootpix flag.
FAVO_INTERACTIVE
public static final int FDI_INTERACTIVE
AVO interactive flag.
FAVO_TRIG
public static final int FDI_TRIG
AVO trig flag.
FAVO_COMMON
public static final int FDI_COMMON
AVO common flag.
FAVO_OPAQUE
public static final int FDI_OPAQUE
AVO opaque flag.
FAVO_RECPATCH
public static final int FDI_RECPATCH
AVO recpatch flag.
FAVO_PERSIST
public static final int FDI_PERSIST
AVO persist flag.
FAVO_BLOCKING
public static final int FDI_BLOCKING
AVO blocking flag.
FAVO_RECURSIVE
public static final int FDI_RECURSIVE
AVO recursive flag.
| Constructor Detail |
AmigaFrame
public AmigaFrame(String
title,
int width, int height, int pixDepth, byte[]
pix_b, int flags)
AmigaFrame
public AmigaFrame(String
title,
int width, int height, int pixDepth, short[]
pix_s, int flags)
AmigaFrame
public AmigaFrame(String
title,
int width, int height, int pixDepth, int[]
pix_i, int flags)
| Method Detail |
contains
public boolean
contains(int x, int y)
contains
public boolean
contains(Point p)
dispose
public void
dispose()
getBounds
public Rectangle
getBounds()
getLocation
public Point
getLocation()
getLocationOnScreen
public Point
getLocationOnScreen()
getMaximumSize
public Dimension
getMaximumSize()
getMinimumSize
public Dimension
getMinimumSize()
getName
public String
getName()
getPreferredSize
public Dimension
getPreferredSize()
getSize
public Dimension
getSize()
getTitle
public String
getTitle()
repaint
public void
repaint()
isClosed
public boolean
isClosed()
setBounds
public void
setBounds(int
x,
int y, int width, int height)
setBounds
public void
setBounds(Rectangle
r)
setPixFlags
public native
void setPixFlags(int
flags,
int
mask)
setLocation
public void
setLocation(int
x,
int
y)
setLocation
public void
setLocation(Point
p)
setName
public void
setName(String
name)
setSize
public void
setSize(int
width,
int
height)
setSize
public void
setSize(Dimension
d)
show
public native
void show()
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
v0.2 Beta
---------
- AmigaFrame class released under LGPL open source license
- intent 1.1 compatibility implemented
- repaint bug fixed
- new FAVO constants added
v0.1 Beta
---------
- Initial public release.
Contact info:
Please let
me know of any improvements or ideas you may have for this class. Email
me at:
rubenmonteiro@oninet.pt
Thanks!
AmigaFrame java class is Copyright 2001 by Ruben Monteiro. All rights reserved.