public abstract class ViewPropertyDescriptor extends Descriptor<ViewProperty>
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
clazz
Modifier | Constructor and Description |
---|---|
protected |
ViewPropertyDescriptor()
Infers the type of the corresponding
Describable from the outer class. |
protected |
ViewPropertyDescriptor(Class<? extends ViewProperty> clazz) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabledFor(View view)
Whether or not the described property is enabled in the current context.
|
ViewProperty |
newInstance(View view)
Creates a default instance of
ViewProperty to be associated
with View object that wasn't created from a persisted XML data. |
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
protected ViewPropertyDescriptor(Class<? extends ViewProperty> clazz)
protected ViewPropertyDescriptor()
Describable
from the outer class.
This version works when you follow the common convention, where a descriptor
is written as the static nested class of the describable class.public ViewProperty newInstance(View view)
ViewProperty
to be associated
with View
object that wasn't created from a persisted XML data.
See View
class javadoc for more details about the life cycle
of View
and when this method is invoked.
public boolean isEnabledFor(View view)
Returning false from this method essentially has the same effect of
making core behaves as if this ViewPropertyDescriptor
is
not a part of ViewProperty.all()
.
This mechanism is useful if the availability of the property is contingent of some other settings.
view
- View for which this property is considered. Never null.Copyright © 2004–2022. All rights reserved.