com.vaadin.shared.ui.grid
Class DetailsConnectorChange

java.lang.Object
  extended by com.vaadin.shared.ui.grid.DetailsConnectorChange
All Implemented Interfaces:
java.io.Serializable

public class DetailsConnectorChange
extends java.lang.Object
implements java.io.Serializable

A description of an indexing modification for a connector. This is used by Grid for internal bookkeeping updates.

Since:
7.5.0
Author:
Vaadin Ltd
See Also:
Serialized Form

Field Summary
static java.util.Comparator<DetailsConnectorChange> REMOVED_FIRST_COMPARATOR
           
 
Constructor Summary
DetailsConnectorChange()
          Create a new connector index change
DetailsConnectorChange(Connector connector, java.lang.Integer oldIndex, java.lang.Integer newIndex, boolean shouldStillBeVisible)
          Convenience constructor for setting all the fields in one line.
 
Method Summary
 Connector getConnector()
          Gets the changed connector.
 java.lang.Integer getNewIndex()
          Gets the new index for the connector.
 java.lang.Integer getOldIndex()
          Gets the old index for the connector.
 boolean isShouldStillBeVisible()
          Checks whether whether the details should remain open, even if connector might be null.
 void setConnector(Connector connector)
          Sets the changed connector.
 void setNewIndex(java.lang.Integer newIndex)
          Sets the new index
 void setOldIndex(java.lang.Integer oldIndex)
          Sets the old index
 void setShouldStillBeVisible(boolean shouldStillBeVisible)
          Sets whether the details should remain open, even if connector might be null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOVED_FIRST_COMPARATOR

public static final java.util.Comparator<DetailsConnectorChange> REMOVED_FIRST_COMPARATOR
Constructor Detail

DetailsConnectorChange

public DetailsConnectorChange()
Create a new connector index change


DetailsConnectorChange

public DetailsConnectorChange(Connector connector,
                              java.lang.Integer oldIndex,
                              java.lang.Integer newIndex,
                              boolean shouldStillBeVisible)
Convenience constructor for setting all the fields in one line.

Calling this constructor will also assert that the state of the pojo is consistent by internal assumptions.

Parameters:
connector - the changed connector
oldIndex - the old index
newIndex - the new index
shouldStillBeVisible - details should be visible regardless of connector
Method Detail

getOldIndex

public java.lang.Integer getOldIndex()
Gets the old index for the connector.

If null, the connector is recently added. This means that getConnector() is expected not to return null.

Returns:
the old index for the connector

getNewIndex

public java.lang.Integer getNewIndex()
Gets the new index for the connector.

If null, the connector should be removed. This means that getConnector() is expected to return null as well.

Returns:
the new index for the connector

getConnector

public Connector getConnector()
Gets the changed connector.

Returns:
the changed connector. Might be null

setConnector

public void setConnector(Connector connector)
Sets the changed connector.

Parameters:
connector - the changed connector. May be null

setOldIndex

public void setOldIndex(java.lang.Integer oldIndex)
Sets the old index

Parameters:
oldIndex - the old index. May be null if a new connector is being inserted

setNewIndex

public void setNewIndex(java.lang.Integer newIndex)
Sets the new index

Parameters:
newIndex - the new index. May be null if a connector is being removed

isShouldStillBeVisible

public boolean isShouldStillBeVisible()
Checks whether whether the details should remain open, even if connector might be null.

Returns:
true iff the details should remain open, even if connector might be null

setShouldStillBeVisible

public void setShouldStillBeVisible(boolean shouldStillBeVisible)
Sets whether the details should remain open, even if connector might be null.

Parameters:
shouldStillBeVisible - true iff the details should remain open, even if connector might be null


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.