java-gnome version 4.0.19

org.gnome.gtk
Class Frame

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.Object
                  extended by org.gnome.gtk.Widget
                      extended by org.gnome.gtk.Container
                          extended by org.gnome.gtk.Bin
                              extended by org.gnome.gtk.Frame
Direct Known Subclasses:
AspectFrame

public class Frame
extends Bin

A decorative border frame with an optional label. This is typically used to surround a group of widgets with a a visual hint grouping them together.

These are frequently over-used and so using Frames is actually highly discouraged: in general Widgets already have sufficient decoration and adding extra horizontal and vertical lines distracts the user and actually makes it harder to distinguish the Widgets from one another. If you need to group widgets, do so with white space or use a technique like applying SizeGroups to give a set of Widgets a consistent appearance.

Note that the "label" can be a full Widget in its own right; if you use the methods which take a text string they will transparently create a Label for you containing that text and using it on the edge of the Frame.

Since:
4.0.3
Author:
Sebastian Mancke, Andrew Cowie, Vreixo Formoso

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gnome.gtk.Widget
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
 
Nested classes/interfaces inherited from class org.gnome.gtk.Object
Object.Destroy
 
Constructor Summary
Frame(String label)
          Construct a new Frame with a simple text label.
 
Method Summary
 String getLabel()
          Returns the text from the frame's edge (assuming it's a Label Widget as is usual practise).
 Widget getLabelWidget()
          Returns the Widget being used as the "label" of the Frame.
 void setLabel(String label)
          Set the text label for the Frame (assuming you created it with a Label in the first place).
 void setLabelAlign(float xalign, float yalign)
          Sets the alignment of the Frame's label.
 void setLabelWidget(Widget label)
          Set a Widget to be the "label" for the Frame.
 void setShadowType(ShadowType type)
          Set the ShadowType of the Frame, that will determine the appearance of the outline.
 
Methods inherited from class org.gnome.gtk.Bin
getChild
 
Methods inherited from class org.gnome.gtk.Container
add, getChildren, remove, setBorderWidth
 
Methods inherited from class org.gnome.gtk.Widget
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
 
Methods inherited from class org.gnome.gtk.Object
connect, destroy
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Frame

public Frame(String label)
Construct a new Frame with a simple text label.

Parameters:
label - The desired label, or null if you don't want to use any label.
Method Detail

getLabel

public String getLabel()
Returns the text from the frame's edge (assuming it's a Label Widget as is usual practise).


getLabelWidget

public Widget getLabelWidget()
Returns the Widget being used as the "label" of the Frame.


setLabel

public void setLabel(String label)
Set the text label for the Frame (assuming you created it with a Label in the first place).


setLabelAlign

public void setLabelAlign(float xalign,
                          float yalign)
Sets the alignment of the Frame's label.

Parameters:
xalign - The position of the label along the top edge of the widget. A value of 0.0f represents left alignment; 1.0f represents right alignment. The default value is 0.0f
yalign - The vertical alignment of the label. A value of 0.0f aligns under the frame; 1.0f aligns above the frame. The default value is 0.5f.
Since:
4.0.7

setLabelWidget

public void setLabelWidget(Widget label)
Set a Widget to be the "label" for the Frame.


setShadowType

public void setShadowType(ShadowType type)
Set the ShadowType of the Frame, that will determine the appearance of the outline. The default is ETCHED_IN.

Since:
4.0.7


java-gnome