MetaDone
metadone.client.grasyla2.visuallibrary.widgets.NearGroup Class Reference
Inheritance diagram for metadone.client.grasyla2.visuallibrary.widgets.NearGroup:
Collaboration diagram for metadone.client.grasyla2.visuallibrary.widgets.NearGroup:

List of all members.

Public Member Functions

void addWidget (Widget w)
void removeWidget (Widget w)
final void removeWidgets ()
final void setWidgets (Collection< Widget > widgets)
Set< Widget > getWidgets ()
Widget getReference ()
boolean setReference (Widget w)
void revalidate ()
double getAllowedGap ()
void setAllowedGap (double allowedGap)
final void revalidateDependency ()
void revalidateDependency (boolean force)

Protected Member Functions

void setLocation (Widget w, Point p)

Private Member Functions

Point computeLocation (Widget w, Rectangle bounds)
Rectangle findBounds (boolean force)

Private Attributes

final HashSet< Widget > widgets = new HashSet<Widget>()
Widget reference
Rectangle lastBounds
double allowedGap = 0.0d
WidgetAction actionReference

Detailed Description

A dependency that keeps a group of widgets together on the scene.

Author:
kma

Member Function Documentation

Point metadone.client.grasyla2.visuallibrary.widgets.NearGroup.computeLocation ( Widget  w,
Rectangle  bounds 
) [private]
double metadone.client.grasyla2.visuallibrary.widgets.NearGroup.getAllowedGap ( )

Gets the allowed gap between the reference widget and the others.

Returns:
The allowed gap

References metadone.client.grasyla2.visuallibrary.widgets.NearGroup.allowedGap.

Widget metadone.client.grasyla2.visuallibrary.widgets.NearGroup.getReference ( )
Set<Widget> metadone.client.grasyla2.visuallibrary.widgets.NearGroup.getWidgets ( )

Gets the widgets in this group.

Returns:
The widgets (unmodifiable)

References metadone.client.grasyla2.visuallibrary.widgets.NearGroup.widgets.

final void metadone.client.grasyla2.visuallibrary.widgets.NearGroup.removeWidgets ( )
final void metadone.client.grasyla2.visuallibrary.widgets.NearGroup.revalidateDependency ( )

Revalidates the dependency.

void metadone.client.grasyla2.visuallibrary.widgets.NearGroup.revalidateDependency ( boolean  force)
void metadone.client.grasyla2.visuallibrary.widgets.NearGroup.setAllowedGap ( double  allowedGap)
void metadone.client.grasyla2.visuallibrary.widgets.NearGroup.setLocation ( Widget  w,
Point  p 
) [protected]

Sets the location of a widget.

Parameters:
wThe widget
pThe new location

Referenced by metadone.client.grasyla2.visuallibrary.widgets.NearGroup.revalidateDependency().

final void metadone.client.grasyla2.visuallibrary.widgets.NearGroup.setWidgets ( Collection< Widget >  widgets)

Member Data Documentation

Initial value:
 new WidgetAction.Adapter() {
        @Override
        public WidgetAction.State mousePressed(Widget w, WidgetMouseEvent ev) {
            setReference(w);
            return super.mouseEntered(w, ev);
        }
    }

Referenced by metadone.client.grasyla2.visuallibrary.widgets.NearGroup.addWidget(), and metadone.client.grasyla2.visuallibrary.widgets.NearGroup.removeWidget().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations