|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.util.servlet.IlvSelectionSupport
ilog.views.diagrammer.servlet.IlvDiagrammerSelectionSupport
public class IlvDiagrammerSelectionSupport
This class is the IlvSelectionSupport implementation dedicated
to the diagrammer.
On the client-side, the IlvSelectionManager class
is dealing with requests to and responses from this Servlet support class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ilog.views.util.servlet.IlvSelectionSupport |
|---|
IlvSelectionSupport.IlvSelectionResponse |
| Field Summary | |
|---|---|
static String |
DIAGRAMMER_KEY
The key to retrieve the diagrammer from the selection response object. |
| Fields inherited from class ilog.views.util.servlet.IlvSelectionSupport |
|---|
REQUEST_TYPE |
| Constructor Summary | |
|---|---|
IlvDiagrammerSelectionSupport(IlvDiagrammerServletSupport support)
Creates a IlvDiagrammerSelectionSupport instance. |
|
| Method Summary | |
|---|---|
protected void |
deselectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer)
Cancels the selection of all the objects in the specified diagram component. |
protected void |
doGetDeselectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
Attempts to deselect all the objects that are currently selected. |
protected void |
doGetSelectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
Attempts to select all the selectable objects. |
protected void |
doGetSelectOne(javax.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 |
doGetSelectOneById(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
String id)
Clears the current selections and attempts to select the object with the specified identifier. |
protected void |
doGetSelectOneMultiple(javax.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 |
doGetSelectOneMultipleById(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
String id)
Attempts to extend the selection with the object with the specified identifier, if any. |
protected void |
doGetUpdateAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
Resynchronizes the selection on the client from the server-side state of selection. |
protected void |
doGetUpdatedCapabilities(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
Updates the capabilities that have changed. |
protected void |
doPostSetProperties(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
List list)
This method is called to manage the update on the server-side of properties that have been changed on selected objects on the client-side. |
protected List |
getAdditionalProperties(IlvSelectionSupport.IlvSelectionResponse response,
Object object)
Returns additional information about a selected object. The overridden version adds the Tag property in addition to the properties mandated by IlvSelectionSupport.getAdditionalProperties(IlvSelectionResponse, Object). |
protected Iterator |
getSelectedObjects(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer)
Returns the nodes and links currently selected in the diagram component. |
IlvDiagrammerServletSupport |
getSupport()
Returns the IlvDiagrammerServletSupport instance attached to
this support. |
protected void |
initializeResponseProperties(IlvSelectionSupport.IlvSelectionResponse response,
javax.servlet.http.HttpServletRequest request)
Overrides IlvSelectionSupport.getAdditionalProperties(ilog.views.util.servlet.IlvSelectionSupport.IlvSelectionResponse, java.lang.Object)
to add the diagrammer to the response properties. |
void |
installListeners()
Installs the mandatory server listeners to properly use this selection support. |
protected boolean |
isSelected(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer,
IlvGraphic obj)
Tests if the specified object is selected. |
void |
removeListeners()
Removes listeners previously installed by installListeners. |
protected void |
selectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer)
Selects all the objects in the specified diagrammer. |
protected void |
setSelected(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer,
IlvGraphic obj,
boolean selected)
Selects the specified object. |
| Methods inherited from class ilog.views.util.servlet.IlvSelectionSupport |
|---|
getLastSelectedObject, handleRequest, setAdditionalProperties, setLastSelectedObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DIAGRAMMER_KEY
| Constructor Detail |
|---|
public IlvDiagrammerSelectionSupport(IlvDiagrammerServletSupport support)
IlvDiagrammerSelectionSupport instance.
support - The image servlet support.| Method Detail |
|---|
public IlvDiagrammerServletSupport getSupport()
IlvDiagrammerServletSupport instance attached to
this support.
public void installListeners()
installListeners in class IlvSelectionSupportpublic void removeListeners()
installListeners.
removeListeners in class IlvSelectionSupport
protected void initializeResponseProperties(IlvSelectionSupport.IlvSelectionResponse response,
javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
IlvSelectionSupport.getAdditionalProperties(ilog.views.util.servlet.IlvSelectionSupport.IlvSelectionResponse, java.lang.Object)
to add the diagrammer to the response properties.
To retrieve the diagrammer from the response object:
IlvDiagrammer diagrammer = (IlvDiagrammer) response.getProperty(DIAGRAMMER_KEY);
initializeResponseProperties in class IlvSelectionSupportresponse - The selection response object.request - The HTTP request.
javax.servlet.ServletException
protected void doGetUpdateAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
throws IOException,
javax.servlet.ServletException
doGetUpdateAll in class IlvSelectionSupportrequest - The HTTP request.response - The response object.
IOException
javax.servlet.ServletException
protected void doGetSelectOne(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
int x,
int y)
throws IOException,
javax.servlet.ServletException
doGetSelectOne in class IlvSelectionSupportrequest - 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
javax.servlet.ServletException
protected void doGetSelectOneMultiple(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
int x,
int y)
throws IOException,
javax.servlet.ServletException
doGetSelectOneMultiple in class IlvSelectionSupportrequest - 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
javax.servlet.ServletException
protected void doGetDeselectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
throws IOException,
javax.servlet.ServletException
doGetDeselectAll in class IlvSelectionSupportrequest - The HTTP request.response - The response object.
IOException
javax.servlet.ServletException
protected void doGetSelectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
throws IOException,
javax.servlet.ServletException
doGetSelectAll in class IlvSelectionSupportrequest - The HTTP request.response - The response object.
IOException
javax.servlet.ServletException
protected void doGetSelectOneById(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
String id)
throws IOException,
javax.servlet.ServletException
doGetSelectOneById in class IlvSelectionSupportrequest - The HTTP request.response - The response object.id - The identifier of the object to select.
IOException
javax.servlet.ServletException
protected void doGetSelectOneMultipleById(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
String id)
throws IOException,
javax.servlet.ServletException
doGetSelectOneMultipleById in class IlvSelectionSupportrequest - The HTTP request.response - The response object.id - The identifier of the object to select.
IOException
javax.servlet.ServletException
protected boolean isSelected(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer,
IlvGraphic obj)
request - The http request.response - The response object.diagrammer - The diagrammer.obj - The object.
obj is selected, true is returned.
protected void setSelected(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer,
IlvGraphic obj,
boolean selected)
This method implementation calls
IlvManager.setSelected(IlvGraphic, boolean, boolean) to select
objects.
request - The http request.response - The response object.diagrammer - The diagrammer.obj - The object to select.selected - If true the object will be selected.
protected void selectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer)
This method implementation calls
IlvManager.selectAll(boolean, boolean) to select objects.
request - The http request.response - The response object.diagrammer - The diagrammer.
protected void deselectAll(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer)
Note: this method must not be called directly. It can be overridden to change the selection behavior.
This method implementation calls
IlvManager.deSelectAll(boolean,boolean) to cancel object
selection.
request - The HTTP request.response - The response object.diagrammer - The diagram component.
protected Iterator getSelectedObjects(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
IlvDiagrammer diagrammer)
This method implementation calls
IlvDiagrammer.getSelectedObjects() to return the selected
objects.
request - The http request.response - The response object.diagrammer - The diagrammer.
remove operation.
protected void doGetUpdatedCapabilities(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response)
throws javax.servlet.ServletException
doGetUpdatedCapabilities in class IlvSelectionSupportrequest - The HTTP request.response - The response object.
javax.servlet.ServletException
protected void doPostSetProperties(javax.servlet.http.HttpServletRequest request,
IlvSelectionSupport.IlvSelectionResponse response,
List list)
throws IOException
doPostSetProperties in class IlvSelectionSupportrequest - The HTTP request.response - The response object.list - The List of additional information on a selected
objects. Each item of this list is itself an List
that corresponds to properties a selected object.
Note that the first object of each of these sub lists is the unique identifier
of the selected object.
IOException
protected List getAdditionalProperties(IlvSelectionSupport.IlvSelectionResponse response,
Object object)
The overridden version adds the Tag property in addition to the properties
mandated by IlvSelectionSupport.getAdditionalProperties(IlvSelectionResponse, Object).
getAdditionalProperties in class IlvSelectionSupportresponse - 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.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||