org.apache.jetspeed.portlets.layout
Class LayoutEvent

java.lang.Object
  extended by org.apache.jetspeed.portlets.layout.LayoutEvent

public class LayoutEvent
extends java.lang.Object

A LayoutEvent is used by ColumnLayout to notify its LayoutAeventListeners that there have been a change in the position of a fragment within the layout.

Constant Values

Author:
Scott T. Weaver
See Also:
Fragment, LayoutEventListener, ColumnLayout

Field Summary
static int ADDED
          Event type value that notifies that a fragment has been added
static int MOVED_DOWN
          Event type value that notifies that a fragment has been moved down
static int MOVED_LEFT
          Event type value that notifies that a fragment has been moved left
static int MOVED_RIGHT
          Event type value that notifies that a fragment has been moved right
static int MOVED_UP
          Event type value that notifies that a fragment has been moved up
 
Constructor Summary
LayoutEvent(int eventType, ContentFragment fragment, LayoutCoordinate originalCoordinate, LayoutCoordinate newCoordinate)
           
LayoutEvent(int eventType, ContentPage page, java.lang.String portletType, java.lang.String portletName)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getEventType()
          Returns the event type (see event constants)
 ContentFragment getFragment()
          Returns the fragment that is the target of this event.
 LayoutCoordinate getNewCoordinate()
          Returns the new/current coordinate of the Fragment targeted by this event.
 LayoutCoordinate getOriginalCoordinate()
          Returns the original (prior to the event) coordinate of the Fragment targeted by this event.
 ContentPage getPage()
          Returns the page that is the target of this event.
 java.lang.String getPortletName()
          Returns the portlet name.
 java.lang.String getPortletType()
          Returns the portlet type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDED

public static final int ADDED
Event type value that notifies that a fragment has been added

See Also:
Constant Field Values

MOVED_UP

public static final int MOVED_UP
Event type value that notifies that a fragment has been moved up

See Also:
Constant Field Values

MOVED_DOWN

public static final int MOVED_DOWN
Event type value that notifies that a fragment has been moved down

See Also:
Constant Field Values

MOVED_LEFT

public static final int MOVED_LEFT
Event type value that notifies that a fragment has been moved left

See Also:
Constant Field Values

MOVED_RIGHT

public static final int MOVED_RIGHT
Event type value that notifies that a fragment has been moved right

See Also:
Constant Field Values
Constructor Detail

LayoutEvent

public LayoutEvent(int eventType,
                   ContentPage page,
                   java.lang.String portletType,
                   java.lang.String portletName)
Parameters:
eventType - The type of event (see the event constants)
page - Page that is the target of this event.
portletType - The new portlet type.
portletName - The new portlet name.
See Also:
ContentFragment

LayoutEvent

public LayoutEvent(int eventType,
                   ContentFragment fragment,
                   LayoutCoordinate originalCoordinate,
                   LayoutCoordinate newCoordinate)
Parameters:
eventType - The type of event (see the event constants)
fragment - Fragment that is the target of this event.
originalCoordinate - the previous LayoutCoordinate of this Fragment
newCoordinate - the new and current coordinates of this fragment.
See Also:
ContentFragment
Method Detail

getEventType

public int getEventType()
Returns the event type (see event constants)

Returns:
the event type (see event constants)
See Also:
ColumnLayout#layoutType

getPage

public ContentPage getPage()
Returns the page that is the target of this event.

Returns:
Page the fragment that is the target of this event.
See Also:
ContentPage

getPortletType

public java.lang.String getPortletType()
Returns the portlet type.

Returns:
the portlet type.

getPortletName

public java.lang.String getPortletName()
Returns the portlet name.

Returns:
the portlet name.

getFragment

public ContentFragment getFragment()
Returns the fragment that is the target of this event.

Returns:
Fragment the fragment that is the target of this event.
See Also:
ContentFragment

getNewCoordinate

public LayoutCoordinate getNewCoordinate()
Returns the new/current coordinate of the Fragment targeted by this event.

Returns:
the new/current coordinate of the Fragment targeted by this event.
See Also:
LayoutCoordinate

getOriginalCoordinate

public LayoutCoordinate getOriginalCoordinate()
Returns the original (prior to the event) coordinate of the Fragment targeted by this event.

Returns:
the original (prior to the event) coordinate of the Fragment targeted by this event.
See Also:
LayoutCoordinate

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.