|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.output.style | +--sub_arctic.output.motif_style
This is an implementation for generating the styles for a motifish look and feel.
Field Summary | |
protected static loaded_image |
_check
|
protected static int |
bevel_start_angle
This is the number of degrees of offset for this beveling of circles. |
protected static int[] |
check_data
|
protected static int |
check_height
|
protected static int |
check_width
|
protected static int |
motif_radio_button_size
We like motif images at 15 pixels x 15 pixels. |
protected int |
motif_scale_height
This is how tall we want our scales to be. |
protected int |
motif_scale_thumb_shift
This is how far to shift the thumb. |
protected int |
motif_scale_thumb_width
This is how big we want our thumbs to be. |
Method Summary | |
void |
bevel_circle(loaded_image img,
boolean up,
color_scheme s)
Bevel a circle for use with radio buttons. |
static void |
bevel_menu_icon(loaded_image img,
int x_offset,
int y_offset,
int w,
int h,
boolean up,
color_scheme s)
Bevel a down triangle for the menu icon. |
void |
bevel_pullright_triangle(drawable d,
boolean up,
int x,
int y,
color_scheme s)
Bevel a triangle for the pullright menu icon. |
static void |
bevel_rect(loaded_image img,
boolean raised,
boolean base,
boolean one_pix,
boolean left,
boolean right,
boolean top,
boolean bottom,
color_scheme colors)
|
static void |
bevel_triangle_down(loaded_image img,
color_scheme s)
Bevel a down triangle for the bottom of a scrollbar. |
static void |
bevel_triangle_left(loaded_image img,
color_scheme s)
Bevel a left triangle for the left of a scrollbar. |
static void |
bevel_triangle_right(loaded_image img,
color_scheme s)
Bevel a right triangle for the right of a scrollbar. |
static void |
bevel_triangle_up(loaded_image img,
color_scheme s)
Bevel an up triangle for the top of a scrollbar. |
loaded_image[] |
button_make_images(int width,
int height,
int x_spacing,
int y_spacing,
boolean menu)
Construct the images for a blank button. |
loaded_image[] |
button_make_images(java.lang.String label,
java.awt.Font font,
int x_spacing,
int y_spacing,
boolean menu)
Construct the images for a button. |
int |
button_x_shift()
Return the amount of shift in x required for an image to placed on this style of button. |
int |
button_y_shift()
Return the amount of shift in y required for an image to placed on this style of button. |
static void |
calculate_check()
|
static loaded_image |
check()
|
loaded_image[] |
checkbox_make_images()
Return a pair of images which give the off (img[0]) and the on (img[1]) appearance for a checkbox. |
loaded_image[] |
checkbox_make_transitions()
Return a pair of transitions images for the transitions from (img[0]) off to on and (img[1])on to off. |
void |
color_scheme_changed()
This function gets called to inform the style that the default_color_scheme has changed. |
int |
drawable_horizontal_space()
This function is called to allow the caller to determine what area of the drawable has been prepared by the style. |
void |
drawable_prepare_rect(drawable d,
int x,
int y,
int w,
int h,
boolean up,
boolean fill)
This function gets called to force the style to set up a rectangular area of a drawable. |
int |
drawable_vertical_space()
This function is called to allow the caller to determine what area of the drawable has been prepared by the style. |
loaded_image[] |
h_scrollbar_images()
Construct three images for a horizontal scrollbar. |
int |
h_scrollbar_minimum_thumb_size()
This is the minimum thumb width of a scrollbar. |
int |
h_scrollbar_thumb_shift()
This method should return how far from the top edge the scrollbar is placed in this style. |
loaded_image |
h_scrollbar_thumb(int w)
This method should return an image of a thumb of a given width. |
loaded_image |
make_menubar_images(java.util.Vector left_items,
java.util.Vector right_items,
int width,
java.awt.Font font,
java.util.Vector left_hotspots,
java.util.Vector right_hotspots)
This is the most complex of the style functions, and the one that certainly leaves the most room for improvement. |
loaded_image[] |
menu_item_image(java.lang.String s,
java.awt.Font f,
int x_spacing,
int y_spacing,
int w,
int h,
boolean pullright)
This function creates the two images of a menu up (unhighlighted) & down (highlighted). |
java.awt.Dimension |
menu_item_natural_size(java.lang.String s,
java.awt.Font f,
int x_spacing,
int y_spacing)
This function determines the "natural" size of menu item of text. |
loaded_image |
menu_item_separator(int w)
Return the image of a menu separator. |
boolean |
menu_pop_right()
This function determines if a menu pops to the right and down from an menu button interactor or if it pops directly down. |
int |
menubar_image_shift()
This parameter controls how far down the images resulting from a menubar should be shifted down (in their hotspot) to compensate for potential style system beveling. |
loaded_image[] |
radio_button_make_images()
Return a pair of images which give the off (img[0]) and the on (img[1]) appearance for a radio button. |
loaded_image[] |
radio_button_make_transitions()
Return a pair of transitions images for the transitions from (img[0]) off to on and (img[1])on to off. |
loaded_image |
scale_background(int w)
This function returns the image of a scale's background at a given width in pixels. |
int |
scale_height()
This returns the height of the scale in pixels. |
int |
scale_thumb_shift()
This returns the number of pixels the thumb is shifted down from the top of the scale. |
loaded_image |
scale_thumb()
This returns the image of the thumb of a scale. |
int |
scale_unusable_width()
This returns the amount of space on both ends which is used by the system for its beveling/color scheme. |
loaded_image[] |
v_scrollbar_images()
Construct three images for a vertical scrollbar. |
int |
v_scrollbar_minimum_thumb_size()
This is the minimum height of a scrollbar thumb. |
int |
v_scrollbar_thumb_shift()
This method should return how far from the left edge the scrollbar is placed in this style. |
loaded_image |
v_scrollbar_thumb(int h)
This method should return an image of a thumb of a given height. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static int check_width
protected static int[] check_data
protected static int check_height
protected static loaded_image _check
protected static int bevel_start_angle
protected static int motif_radio_button_size
protected int motif_scale_height
protected int motif_scale_thumb_width
protected int motif_scale_thumb_shift
Method Detail |
public static loaded_image check()
public static void calculate_check()
public static void bevel_rect(loaded_image img, boolean raised, boolean base, boolean one_pix, boolean left, boolean right, boolean top, boolean bottom, color_scheme colors)
public static void bevel_triangle_up(loaded_image img, color_scheme s)
loaded_image
- img the image you want to put the triangle in (any
contents of this rectangle are erased).color_scheme
- s the color scheme to use for the drawing.public static void bevel_triangle_down(loaded_image img, color_scheme s)
loaded_image
- img the image you want to put the triangle in (any
contents of this rectangle are erased).color_scheme
- s the color scheme to use for the drawing.public static void bevel_menu_icon(loaded_image img, int x_offset, int y_offset, int w, int h, boolean up, color_scheme s)
loaded_image
- img the image you want to put the triangle inint
- x_offset the offset you want the icon at in Xint
- y_offset the offset you want the icon at in Yint
- w the width of the icon you wantint
- h the height of the icon you wantboolean
- up true if you want this icon to appear raisedcolor_scheme
- s the color scheme to use for the drawingpublic void bevel_pullright_triangle(drawable d, boolean up, int x, int y, color_scheme s)
drawable
- d the surface to bevel on.boolean
- up true if you want this object to appear raised.int
- x x offset on the drawable.int
- y y offset on the drawable.color_scheme
- s the color scheme to bevel in.public static void bevel_triangle_left(loaded_image img, color_scheme s)
loaded_image
- img the image you want to put the triangle in (any
contents of this rectangle are erased).color_scheme
- s the color scheme to use for the drawing.public static void bevel_triangle_right(loaded_image img, color_scheme s)
loaded_image
- img the image you want to put the triangle in (any
contents of this rectangle are erased).color_scheme
- s the color scheme to use for the drawingpublic void bevel_circle(loaded_image img, boolean up, color_scheme s)
loaded_image
- img the image to put the circle in.boolean
- up whether to bevel this image in the "up position"
(true) or the "down position" (false).color_scheme
- s the color scheme we are using.public loaded_image[] v_scrollbar_images()
public int v_scrollbar_thumb_shift()
public loaded_image v_scrollbar_thumb(int h)
int
- h the height of the thumb in pixelspublic int v_scrollbar_minimum_thumb_size()
public loaded_image[] h_scrollbar_images()
public int h_scrollbar_thumb_shift()
public loaded_image h_scrollbar_thumb(int w)
int
- w the width of the thumb in pixels.public int h_scrollbar_minimum_thumb_size()
public loaded_image[] button_make_images(java.lang.String label, java.awt.Font font, int x_spacing, int y_spacing, boolean menu)
String
- label the string for the button.Font
- the font to draw the button with.int
- x_spacing the amount of x border (appears on left and right).int
- y_spacing the amount of y border (appears on top and bottom).boolean
- menu true if you want the appearance of a menu button.public loaded_image[] button_make_images(int width, int height, int x_spacing, int y_spacing, boolean menu)
int
- width this is the usable width you desire for
this button.int
- height this is the usable height you desire for
this button.int
- x_spacing the amount of x border (appears on left and
right).int
- y_spacing the amount of y border (appears on top and
bottom).boolean
- menu true if you want the appearance of a menu buttonpublic int button_x_shift()
public int button_y_shift()
public loaded_image[] radio_button_make_images()
public loaded_image[] radio_button_make_transitions()
public loaded_image[] checkbox_make_images()
public loaded_image[] checkbox_make_transitions()
public void color_scheme_changed()
public void drawable_prepare_rect(drawable d, int x, int y, int w, int h, boolean up, boolean fill)
drawable
- d the drawable to prepare. It assumed that the style
will be called before the caller does his
drawing, so the style can and should fill the
background.int
- x the x coordinate of the top left corner of the area to
prepare.int
- y the y coordinate of the top left corner of the area to
prepare.int
- w the width of the area to prepare.int
- h the height of the area of prepare.boolean
- up if this is true the style may draw this area raised,
if this is false the style may draw this area lowered.
The style is under no obligation to follow this hint.boolean
- fill true if the style system should fill the background.public int drawable_horizontal_space()
public int drawable_vertical_space()
public loaded_image scale_background(int w)
int
- w the width of the scale in pixels.public int scale_height()
public loaded_image scale_thumb()
public int scale_thumb_shift()
public int scale_unusable_width()
public boolean menu_pop_right()
public java.awt.Dimension menu_item_natural_size(java.lang.String s, java.awt.Font f, int x_spacing, int y_spacing)
String
- s the string to display.Font
- f the font to display the text in.int
- x_spacing the amount of horizontal spacing desired.int
- y_spacing the amount of vertical spacing desired.public loaded_image[] menu_item_image(java.lang.String s, java.awt.Font f, int x_spacing, int y_spacing, int w, int h, boolean pullright)
String
- s the string to display.Font
- f the font to display the text in.int
- x_spacing the amount of horizontal spacing desired.int
- y_spacing the amount of vertical spacing desired.int
- w width of the image.int
- h height of the image.boolean
- pullright true if you want a notation for a pullright
image on this menu item.public loaded_image menu_item_separator(int w)
public loaded_image make_menubar_images(java.util.Vector left_items, java.util.Vector right_items, int width, java.awt.Font font, java.util.Vector left_hotspots, java.util.Vector right_hotspots)
The caller supplies the style system with two vectors. Each vector must contain only strings or loaded_images. (If the loaded images are taller than the height of the font supplied, they will be clipped.) The caller is responsible for making sure the types of the objects are correct. The style system will create it set of hot spots and images with the first vector occupying the "normal" or left positions and the the second vector occupying the "special" or right positions. These vectors may not be null, although they may be empty.
Vector
- left this should be a non-null (but possibly empty)
vector of strings and images. Items in this
vector will be replaced with loaded_images
representing that items "down" image. These
items will appear on the left of the menu
bar, in the order supplied.Vector
- right this should be a non-null (but possibly empty)
vector of strings and images. Items in this
vector will be replaced with loaded_images
representing that items "down" image. These
items will appear on the right of the
menubar in the order supplied (last in the
Vector being the rightmost).int
- width width of the menubar in pixels (items which
don't fit on the menubar will be clipped)Font
- font the font to use for rendering strings. If
you have a menubar which has only images on
it, the menu bar is still the height of this
font.Vector
- left_hotspots the caller should pass a non-null but empty
vector which will be filled in which
Rectangle objects indicating the positions
of the objects in the left vector on the
returned image.Vector
- right_hotspots the caller should pass a non-null but empty
vector which will be filled in which
Rectangle objects indicating the positions
of the objects in the right vector on the
returned image.public int menubar_image_shift()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |