The Frame widget is a Bin that surrounds its child with a decorative
frame and an optional label. If present, the label is drawn in the
gap in the top side of the frame by default.
getLabel
public String getLabel()
Returns the text of the label which is being displayed at the top of the
frame.
- The text of the label for the frame, if any.
getLabelAlign
public double getLabelAlign()
Returns a number representing the alignment of the label
- The alignment of the label on the top of the frame.
setLabelAlign(double)
getLabelWidget
public Widget getLabelWidget()
Returns the widget being used as the label of the frame. If the frame has
just been constructed with a label string, then this will be a
Label
widget. This method allows you to customise the widget.
- The widget currently being used as the label.
getShadow
public ShadowType getShadow()
Returns the shadow type in use
- shadowType the shadow tyoe being displayed
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Bin
gtk_frame_get_label
protected static final String gtk_frame_get_label(Handle frame)
gtk_frame_get_label_align
protected static final void gtk_frame_get_label_align(Handle frame,
double[] xalign,
double[] yalign)
gtk_frame_get_label_widget
protected static final Handle gtk_frame_get_label_widget(Handle frame)
gtk_frame_get_shadow_type
protected static final int gtk_frame_get_shadow_type(Handle frame)
gtk_frame_get_type
protected static final int gtk_frame_get_type()
gtk_frame_new
protected static final Handle gtk_frame_new(String label)
gtk_frame_set_label
protected static final void gtk_frame_set_label(Handle frame,
String label)
gtk_frame_set_label_align
protected static final void gtk_frame_set_label_align(Handle frame,
double xalign,
double yalign)
gtk_frame_set_label_widget
protected static final void gtk_frame_set_label_widget(Handle frame,
Handle labelWidget)
gtk_frame_set_shadow_type
protected static final void gtk_frame_set_shadow_type(Handle frame,
int type)
removeLabel
public void removeLabel()
Removes the label from the frame
setLabel
public void setLabel(String label)
Changes the label which is displayed in the frame border.
label
- The text to display
setLabelAlign
public void setLabelAlign(double align)
Sets the alignment of the label widget along the top edge of the frame.
A vale of 0.0 means full left align; 0.5 means centered; 1.0 is full
right align
align
- A number representing the alignment of the label.
setLabelWidget
public void setLabelWidget(Widget labelWidget)
Sets the widget to use as the label for the frame.
If you want a simple label, use the
setLabel(String)
method
labelWidget
- The widget to use in the label position of the frame.
setShadow
public void setShadow(ShadowType shadowType)
Sets the
ShadowType
to be displayed for the frame.
shadowType
- the shadow type to be used.