|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.output.style
This is an abstract class for generating the styles for a particular look and giving the toolkit information about the feel.
Constructor Summary | |
style()
|
Method Summary | |
abstract loaded_image[] |
button_make_images(int width,
int height,
int x_spacing,
int y_spacing,
boolean menu)
Construct the images for a button which is blank (so the app can draw on it). |
abstract 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. |
abstract int |
button_x_shift()
Return the amount of shift in x required for an image to placed on this style of button. |
abstract int |
button_y_shift()
Return the amount of shift in y required for an image to placed on this style of button. |
abstract 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. |
abstract loaded_image[] |
checkbox_make_transitions()
Return a pair of transition images for the transitions from (img[0]) off to on and (img[1])on to off. |
abstract void |
color_scheme_changed()
This function gets called to inform the style that the default_color_scheme has changed. |
abstract 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. |
abstract 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. |
abstract 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. |
abstract loaded_image[] |
h_scrollbar_images()
Construct three images for a horizontal scrollbar. |
abstract int |
h_scrollbar_minimum_thumb_size()
This is the minimum width of a scrollbar thumb. |
abstract int |
h_scrollbar_thumb_shift()
This method should return how far from the top edge the scrollbar is placed in this style. |
abstract loaded_image |
h_scrollbar_thumb(int w)
This method should return an image of a thumb of a given width. |
abstract loaded_image |
make_menubar_images(java.util.Vector left,
java.util.Vector right,
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. |
abstract 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). |
abstract 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. |
abstract loaded_image |
menu_item_separator(int w)
Return the image of a menu separator. |
abstract 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. |
abstract 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. |
abstract 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. |
abstract 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. |
abstract loaded_image |
scale_background(int w)
This function returns the image of a scale's background at a given width in pixels. |
abstract int |
scale_height()
This returns the height of the scale in pixels. |
abstract int |
scale_thumb_shift()
This returns the number of pixels the thumb is shifted down from the top of the scale. |
abstract loaded_image |
scale_thumb()
This returns the image of the thumb of a scale. |
abstract int |
scale_unusable_width()
This returns the amount of space on both ends which is used by the system for its beveling/color scheme. |
abstract loaded_image[] |
v_scrollbar_images()
Construct three images for a vertical scrollbar. |
abstract int |
v_scrollbar_minimum_thumb_size()
This is the minimum height of a scrollbar thumb. |
abstract int |
v_scrollbar_thumb_shift()
This method should return how far from the left edge the scrollbar is placed in this style. |
abstract 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 |
Constructor Detail |
public style()
Method Detail |
public abstract loaded_image[] v_scrollbar_images()
public abstract int v_scrollbar_thumb_shift()
public abstract loaded_image v_scrollbar_thumb(int h)
int
- h the height of the thumb in pixels.public abstract int v_scrollbar_minimum_thumb_size()
public abstract loaded_image[] h_scrollbar_images()
public abstract int h_scrollbar_thumb_shift()
public abstract loaded_image h_scrollbar_thumb(int w)
int
- w the width of the thumb in pixels.public abstract int h_scrollbar_minimum_thumb_size()
public abstract 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 abstract 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 button.public abstract int button_x_shift()
public abstract int button_y_shift()
public abstract loaded_image[] radio_button_make_images()
public abstract loaded_image[] radio_button_make_transitions()
public abstract loaded_image[] checkbox_make_images()
public abstract loaded_image[] checkbox_make_transitions()
public abstract loaded_image scale_background(int w)
int
- w the width of the scale in pixels.public abstract int scale_height()
public abstract loaded_image scale_thumb()
public abstract int scale_thumb_shift()
public abstract int scale_unusable_width()
public abstract void color_scheme_changed()
public abstract boolean menu_pop_right()
public abstract 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 displayFont
- f the font to display the text inint
- x_spacing the amount of horizontal spacing desired (this
is 1/2 the total horizontal spacing).int
- y_spacing the amount of vertical spacing desired (this
is 1/2 the total vertical spacing).public abstract 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 abstract loaded_image menu_item_separator(int w)
public abstract void drawable_prepare_rect(drawable d, int x, int y, int w, int h, boolean up, boolean fill)
drawable
- d the drawable to prepare.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 backgroundpublic abstract int drawable_horizontal_space()
public abstract int drawable_vertical_space()
public abstract loaded_image make_menubar_images(java.util.Vector left, java.util.Vector right, 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_items 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_items 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 abstract int menubar_image_shift()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |