Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ protected void initConfig() {
setCssClass(getConfiguredCssClass());
setDisplayStyle(getConfiguredDisplayStyle());
setGridDataHints(getConfiguredGridDataHints());
setAnimateBoundsChange(getConfiguredAnimateBoundsChange());
}

@Override
Expand Down Expand Up @@ -190,6 +191,15 @@ protected String getConfiguredDisplayStyle() {
return DISPLAY_STYLE_DEFAULT;
}

/**
* Configures whether to animate changes of the tile bounds. The default is <code>true</code>.
*/
@ConfigProperty(ConfigProperty.BOOLEAN)
@Order(150)
protected boolean getConfiguredAnimateBoundsChange() {
return true;
}

/**
* Configures the grid data for this tile.
* <p>
Expand Down Expand Up @@ -295,6 +305,16 @@ protected void setDisplayStyle(String style) {
propertySupport.setPropertyString(PROP_DISPLAY_STYLE, style);
}

@Override
public boolean isAnimateBoundsChange() {
return propertySupport.getPropertyBool(PROP_ANIMATE_BOUNDS_CHANGE);
}

@Override
public void setAnimateBoundsChange(boolean animateBoundsChange) {
propertySupport.setPropertyBool(PROP_ANIMATE_BOUNDS_CHANGE, animateBoundsChange);
}

protected IDataChangeListener getInternalDataChangeListener() {
return m_internalDataChangeListener;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public interface ITile extends IWidget, IOrdered, IStyleable, IExtensibleObject,
String PROP_COLOR_SCHEME = "colorScheme";
String PROP_GRID_DATA_HINTS = "gridDataHints";
String PROP_DISPLAY_STYLE = "displayStyle";
String PROP_ANIMATE_BOUNDS_CHANGE = "animateBoundsChange";

/**
* This is the default display style. If it is active, default styling is applied like visualizing the selection.
Expand Down Expand Up @@ -77,4 +78,8 @@ public interface ITile extends IWidget, IOrdered, IStyleable, IExtensibleObject,

@Override
boolean isLoading();

boolean isAnimateBoundsChange();

void setAnimateBoundsChange(boolean animateBoundsChange);
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ public Object prepareValueForToJson(Object value) {
return ((IColorScheme) value).getIdentifier();
}
});
putJsonProperty(new JsonProperty<T>(IFormFieldTile.PROP_DISPLAY_STYLE, model) {
putJsonProperty(new JsonProperty<>(IFormFieldTile.PROP_DISPLAY_STYLE, model) {
@Override
protected String modelValue() {
return getModel().getDisplayStyle();
}
});
putJsonProperty(new JsonProperty<T>(ITile.PROP_LOADING, model) {
putJsonProperty(new JsonProperty<>(ITile.PROP_LOADING, model) {
@Override
protected Boolean modelValue() {
return getModel().isLoading();
}
});
putJsonProperty(new JsonProperty<T>(ITile.PROP_GRID_DATA_HINTS, model) {
putJsonProperty(new JsonProperty<>(ITile.PROP_GRID_DATA_HINTS, model) {
@Override
protected GridData modelValue() {
return getModel().getGridDataHints();
Expand All @@ -73,5 +73,11 @@ public Object prepareValueForToJson(Object value) {
return JsonGridData.toJson((GridData) value);
}
});
putJsonProperty(new JsonProperty<>(ITile.PROP_ANIMATE_BOUNDS_CHANGE, model) {
@Override
protected Boolean modelValue() {
return getModel().isAnimateBoundsChange();
}
});
}
}