public class IlvGanttSelectionSupport extends IlvSelectionSupport
IlvSelectionSupport
implementation dedicated
to Gantt charts.Modifier and Type | Class and Description |
---|---|
static class |
IlvGanttSelectionSupport.DefaultIdentifierFactory
Default implementation of
IdentifierFactory . |
static interface |
IlvGanttSelectionSupport.IdentifierFactory
Defines a factory of identifiers for Gantt model objects.
|
IlvSelectionSupport.IlvSelectionResponse
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVITY_OBJECT_TYPE
Identifier for the Gantt model object type Activity.
|
static String |
CONSTRAINT_OBJECT_TYPE
Identifier for the Gantt model object type Constraint.
|
static String |
RESERVATION_OBJECT_TYPE
Identifier for the Gantt model object type Reservation.
|
static String |
RESOURCE_OBJECT_TYPE
Identifier for the Gantt model object type Resource.
|
REQUEST_TYPE
Constructor and Description |
---|
IlvGanttSelectionSupport(IlvGanttServletSupport support)
Creates an
IlvGanttSelectionSupport instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
cacheObjectId(IlvGanttModel model,
Object object,
String id)
Caches the association of an identifier to a Gantt model object.
|
protected IlvGanttSheetSelectionSupport |
createGanttSheetSelectionSupport()
Creates the selection support for the Gantt sheet component.
|
protected IlvGanttTableSelectionSupport |
createGanttTableSelectionSupport()
Creates the selection support for the Gantt table component.
|
protected IlvServerAction |
createImageModeAction()
Creates the server action that handles changing the representation mode for
the selection.
|
protected IlvServerAction |
createMoveSelectionAction()
Creates the server action that handles moving the selected objects.
|
protected IlvServerAction |
createResizeActivityAction()
Creates the server action that handles resizing the selected activities.
|
protected IlvServerAction |
createSelectObjectAction()
Creates the server action that handles selecting objects.
|
protected void |
doGetSelectOne(jakarta.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
int x,
int y)
Clears the current selections and attempts to select the object at a given position
If a selectable object is found with the specified position, it is selected.
|
protected void |
doGetSelectOneMultiple(jakarta.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
int x,
int y)
Attempts to extend the selection with the object at a given position, if
any.
|
protected void |
doGetUpdateAll(jakarta.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
Resynchronizes the selection on the client from the server-side state of
selection.
|
protected List |
getAdditionalProperties(IlvSelectionSupport.IlvSelectionResponse response,
Object object)
Returns additional information about a selected object.
|
IlvGanttComponentSelectionSupport |
getDelegate(jakarta.servlet.http.HttpServletRequest request)
Returns the selection support suitable for a type of component.
|
String |
getIdentifier(Object object)
Returns the identifier associated to a Gantt model object.
|
IlvGanttSelectionSupport.IdentifierFactory |
getIdentifierFactory()
Returns the factory of identifiers for Gantt model objects.
|
protected Object |
getObject(IlvGanttModel model,
String id)
Returns the Gantt model object corresponding to an identifier, provided
that the object identifier was previously cached using
cacheObjectId . |
protected Object |
getObject(IlvGanttModel model,
String id,
String type)
Returns the Gantt model object corresponding to an identifier and a type.
|
IlvGanttServletSupport |
getSupport()
Returns the
IlvGanttServletSupport instance attached to
this support. |
boolean |
handleRequest(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response)
Handles a selection request.
|
void |
installListeners()
Installs the server action listeners to properly handle selection actions.
|
void |
removeListeners()
Removes the server action previously installed with
installListeners . |
void |
setIdentifierFactory(IlvGanttSelectionSupport.IdentifierFactory factory)
Sets the factory of identifier for Gantt model objects.
|
doGetDeselectAll, doGetSelectAll, doGetSelectOneById, doGetSelectOneMultipleById, doGetUpdatedCapabilities, doPostSetProperties, getLastSelectedObject, initializeResponseProperties, isResizable, setAdditionalProperties, setLastSelectedObject
public static final String ACTIVITY_OBJECT_TYPE
public static final String RESOURCE_OBJECT_TYPE
public static final String CONSTRAINT_OBJECT_TYPE
public static final String RESERVATION_OBJECT_TYPE
public IlvGanttSelectionSupport(IlvGanttServletSupport support)
IlvGanttSelectionSupport
instance.support
- The image servlet support.public IlvGanttServletSupport getSupport()
IlvGanttServletSupport
instance attached to
this support.public IlvGanttComponentSelectionSupport getDelegate(jakarta.servlet.http.HttpServletRequest request)
request
- The HTTP request.comp
request parameter.protected IlvGanttSheetSelectionSupport createGanttSheetSelectionSupport()
protected IlvGanttTableSelectionSupport createGanttTableSelectionSupport()
public void installListeners()
installListeners
in class IlvSelectionSupport
public void removeListeners()
installListeners
.removeListeners
in class IlvSelectionSupport
protected List getAdditionalProperties(IlvSelectionSupport.IlvSelectionResponse response, Object object)
getAdditionalProperties
in class IlvSelectionSupport
response
- The selection response object.object
- The object selected or deselected.String
, an
array, a List
or Map
.
List
and arrays are rendered as JSON arrays on the
client and Map
are rendered as JSON objects on the
client.
Note that the two first objects must be:
ID
-- A unique identifier of the selected object.Movable
-- true
if this object is
movable, false
otherwise.Type
-- the type of the selected object.
protected void doGetUpdateAll(jakarta.servlet.http.HttpServletRequest request, IlvSelectionSupport.IlvSelectionResponse response) throws IOException, jakarta.servlet.ServletException
doGetUpdateAll
in class IlvSelectionSupport
request
- The HTTP request.response
- The response object.IOException
jakarta.servlet.ServletException
protected void doGetSelectOne(jakarta.servlet.http.HttpServletRequest request, IlvSelectionSupport.IlvSelectionResponse response, int x, int y) throws IOException, jakarta.servlet.ServletException
doGetSelectOne
in class IlvSelectionSupport
request
- The HTTP request.response
- The response object.x
- The x coordinate of the point in view coordinates.y
- The y coordinate of the point in view coordinatesIOException
jakarta.servlet.ServletException
protected void doGetSelectOneMultiple(jakarta.servlet.http.HttpServletRequest request, IlvSelectionSupport.IlvSelectionResponse response, int x, int y) throws IOException, jakarta.servlet.ServletException
doGetSelectOneMultiple
in class IlvSelectionSupport
request
- The HTTP request.response
- The response object.x
- The x coordinate of the point in view coordinates.y
- The y coordinate of the point in view coordinates.IOException
jakarta.servlet.ServletException
public boolean handleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
handleRequest
in class IlvSelectionSupport
request
- The HTTP servlet request.response
- The HTTP servlet response.false
if the request is not recognized by this
servlet.IOException
jakarta.servlet.ServletException
protected IlvServerAction createImageModeAction()
protected IlvServerAction createSelectObjectAction()
protected IlvServerAction createMoveSelectionAction()
protected IlvServerAction createResizeActivityAction()
public IlvGanttSelectionSupport.IdentifierFactory getIdentifierFactory()
public void setIdentifierFactory(IlvGanttSelectionSupport.IdentifierFactory factory)
IlvGanttServletSupport.createSelectionSupport()
.factory
- The factory to be set.public String getIdentifier(Object object)
object
- A Gantt model object.protected Object getObject(IlvGanttModel model, String id)
cacheObjectId
.model
- The model that contains the object to be returned.id
- The identifier of the object to be returned.protected void cacheObjectId(IlvGanttModel model, Object object, String id)
model
- The Gantt model containing the object.object
- The object.id
- The identifier of the object.protected Object getObject(IlvGanttModel model, String id, String type)
model
- The model that contains the object to be returned.id
- The identifier of the object to be returned.type
- The type of object. One of:null
if none
is found for the given type and identifier.cacheObjectId(IlvGanttModel, Object, String)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.