public class Transparency extends EnumProperty
Defines whether an event is visible to free/busy time searches or not. If an event does not have this property, the event should be considered opaque (visible) to searches.
Code sample (creating):
VEvent event = new VEvent(); Transparency transp = Transparency.opaque(); event.setTransparency(transp); event.setTransparency(true); //hidden from searches event.setTransparency(false); //visible to searches
Code sample (retrieving):
ICalendar ical = ... for (VEvent event : ical.getEvents()) { Transparency transp = event.getTransparency(); if (transp.isOpaque()) { //... } else if (transp.isTransparent()) { //... } }
Modifier and Type | Field and Description |
---|---|
static String |
OPAQUE |
static String |
TRANSPARENT |
value
parameters
Constructor and Description |
---|
Transparency(String value)
Creates a new transparency property.
|
Transparency(Transparency original)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Transparency |
copy()
Creates a copy of this property object.
|
protected Collection<String> |
getStandardValues(ICalVersion version)
Gets the list of acceptable values for this property.
|
boolean |
isOpaque()
Determines if the event is visible to free/busy time searches.
|
boolean |
isTransparent()
Determines if the event is hidden from free/busy time searches.
|
static Transparency |
opaque()
Creates a property that marks the event as being visible to free/busy
time searches.
|
static Transparency |
transparent()
Creates a property that marks the event as being hidden from free/busy
time searches.
|
equals, getValueSupportedVersions, hashCode, is, validate
getValue, getValue, setValue, toStringValues, valueEquals, valueHashCode
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, toString, validate
public static final String OPAQUE
public static final String TRANSPARENT
public Transparency(String value)
value
- the valuepublic Transparency(Transparency original)
original
- the property to make a copy ofpublic static Transparency opaque()
public boolean isOpaque()
public static Transparency transparent()
public boolean isTransparent()
protected Collection<String> getStandardValues(ICalVersion version)
EnumProperty
getStandardValues
in class EnumProperty
version
- the versionpublic Transparency copy()
ICalProperty
Creates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
ICalProperty.ICalProperty(ICalProperty)
super constructor to ensure that the
parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException
will be thrown when an attempt is
made to copy the property (such as in the
ICalendar class's copy constructor
).
copy
in class ICalProperty
Copyright © 2013-2017 Michael Angstadt. All Rights Reserved.