|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.Bin
org.gnome.gtk.Frame
public class Frame
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 SizeGroup
s 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.
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 |
---|
public Frame(String label)
label
- The desired label, or null
if you don't want to
use any label.Method Detail |
---|
public String getLabel()
public Widget getLabelWidget()
public void setLabel(String label)
public void setLabelAlign(float xalign, float yalign)
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
.public void setLabelWidget(Widget label)
public void setShadowType(ShadowType type)
ETCHED_IN
.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |