001: /*
002: * Copyright (c) 2005-2008 Substance Kirill Grouchnikov. All Rights Reserved.
003: *
004: * Redistribution and use in source and binary forms, with or without
005: * modification, are permitted provided that the following conditions are met:
006: *
007: * o Redistributions of source code must retain the above copyright notice,
008: * this list of conditions and the following disclaimer.
009: *
010: * o Redistributions in binary form must reproduce the above copyright notice,
011: * this list of conditions and the following disclaimer in the documentation
012: * and/or other materials provided with the distribution.
013: *
014: * o Neither the name of Substance Kirill Grouchnikov nor the names of
015: * its contributors may be used to endorse or promote products derived
016: * from this software without specific prior written permission.
017: *
018: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
019: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
020: * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
021: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
022: * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
023: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
025: * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
026: * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
027: * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
028: * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
029: */
030: package org.jvnet.substance.utils.params;
031:
032: import org.jvnet.substance.border.SubstanceBorderPainter;
033: import org.jvnet.substance.button.SubstanceButtonShaper;
034: import org.jvnet.substance.painter.SubstanceGradientPainter;
035: import org.jvnet.substance.theme.SubstanceTheme;
036: import org.jvnet.substance.utils.SubstanceConstants.ImageWatermarkKind;
037: import org.jvnet.substance.watermark.SubstanceImageWatermark;
038: import org.jvnet.substance.watermark.SubstanceWatermark;
039:
040: /**
041: * Base interface for parameter readers. This class is <b>for internal use only</b>.
042: *
043: * @author Kirill Grouchnikov
044: */
045: public interface ParamReader {
046: /**
047: * Returns the value that specifies the global <b>Substance</b> theme. If
048: * not <code>null</code>, should be a fully-qualified class name of a
049: * class that extends {@link SubstanceTheme}.
050: *
051: * @return The value that specifies the global <b>Substance</b> theme. If
052: * not <code>null</code>, should be a fully-qualified class name
053: * of a class that extends {@link SubstanceTheme}.
054: */
055: public String getThemeProperty();
056:
057: /**
058: * Returns the value that specifies the global <b>Substance</b> watermark.
059: * If not <code>null</code>, should be a fully-qualified class name of a
060: * class that implements {@link SubstanceWatermark}.
061: *
062: * @return The value that specifies the global <b>Substance</b> watermark.
063: * If not <code>null</code>, should be a fully-qualified class
064: * name of a class that implements {@link SubstanceWatermark}.
065: */
066: public String getWatermarkProperty();
067:
068: /**
069: * Returns the value that specifies the image location for image-based
070: * watermark. This value is relevant only if the
071: * {@link #getWatermarkProperty()} returns the class name of
072: * {@link SubstanceImageWatermark}. The value can point at either the local
073: * file or remote HTTP-based file.
074: *
075: * @return The value that specifies the image location for image-based
076: * watermark.
077: */
078: public String getWatermarkImageProperty();
079:
080: /**
081: * Returns the value that specifies the kind of image-based watermark. This
082: * value is relevant only if the {@link #getWatermarkProperty()} returns the
083: * class name of {@link SubstanceImageWatermark}.
084: *
085: * @return The value that specifies the kind of image-based watermark.
086: */
087: public ImageWatermarkKind getWatermarkImageKindProperty();
088:
089: /**
090: * Returns the value that specifies the opacity of image-based watermark.
091: * This value is relevant only if the {@link #getWatermarkProperty()}
092: * returns the class name of {@link SubstanceImageWatermark}.
093: *
094: * @return The value that specifies the opacity of image-based watermark.
095: */
096: public Float getWatermarkImageOpacityProperty();
097:
098: /**
099: * Returns indication whether the watermark should "bleed" through usuallu
100: * opaque controls, such as trees, lists, tables and text controls (text
101: * field, text area, etc).
102: *
103: * @return Indication whether the watermark should "bleed" through usuallu
104: * opaque controls.
105: */
106: public boolean toBleedWatermark();
107:
108: /**
109: * Returns the value that specifies the global <b>Substance</b> button
110: * shaper. If not <code>null</code>, should be a fully-qualified class
111: * name of a class that implements {@link SubstanceButtonShaper}.
112: *
113: * @return The value that specifies the global <b>Substance</b> button
114: * shaper. If not <code>null</code>, should be a fully-qualified
115: * class name of a class that implements
116: * {@link SubstanceButtonShaper}.
117: */
118: public String getButtonShaperProperty();
119:
120: /**
121: * Returns the value that specifies the global <b>Substance</b> gradient
122: * painter. If not <code>null</code>, should be a fully-qualified class
123: * name of a class that implements {@link SubstanceGradientPainter}.
124: *
125: * @return The value that specifies the global <b>Substance</b> gradient
126: * painter. If not <code>null</code>, should be a fully-qualified
127: * class name of a class that implements
128: * {@link SubstanceGradientPainter}.
129: */
130: public String getGradientPainterProperty();
131:
132: /**
133: * Returns the value that specifies the global <b>Substance</b> border
134: * painter. If not <code>null</code>, should be a fully-qualified class
135: * name of a class that implements {@link SubstanceBorderPainter}.
136: *
137: * @return The value that specifies the global <b>Substance</b> border
138: * painter. If not <code>null</code>, should be a fully-qualified
139: * class name of a class that implements
140: * {@link SubstanceBorderPainter}.
141: */
142: public String getBorderPainterProperty();
143:
144: /**
145: * Returns the indication for showing the heap status panel in the
146: * custom-decorated title panes. If the value is <code>null</code>, no
147: * heap status panel will be shown, if the value is an empty string, the
148: * heap status panel will be shown. Otherwise, the value is taken to be the
149: * filename for logging the heap status information (and the heap status
150: * panel will be shown).
151: *
152: * @return Indication for showing the heap status panel in the
153: * custom-decorated title panes. Possible return values:
154: * <ul>
155: * <li>If the value is <code>null</code>, no heap status panel
156: * will be shown.
157: * <li>If the value is an empty string, the heap status panel will
158: * be shown.
159: * <li>Otherwise, the value is taken to be the filename for logging
160: * the heap status information (and the heap status panel will be
161: * shown).
162: * </ul>
163: */
164: public String toShowHeapStatusPanelProperty();
165:
166: /**
167: * Returns the indication whether <b>Substance</b> can add additional UI
168: * elements (such as system menu items, menu search panel).
169: *
170: * @return <code>true</code> if <b>Substance</b> can add additional UI
171: * elements (such as system menu items, menu search panel),
172: * <code>false</code> otherwise.
173: */
174: public boolean toShowExtraElementProperty();
175:
176: /**
177: * Returns the name of the trace file. The trace file will contain output of
178: * the memory analyser which can be used to pinpoint the memory leaks.
179: *
180: * @return The name of the trace file for memory analysis. If
181: * <code>null</code>, the tracing mechanism will not be
182: * activated.
183: */
184: public String getTraceFileNameProperty();
185:
186: /**
187: * Returns the indication whether <b>Substance</b> should enable inverted
188: * color themes.
189: *
190: * @return <code>true</code> if <b>Substance</b> should enable inverted
191: * color themes, <code>false</code> otherwise.
192: */
193: public boolean toEnableInvertedThemes();
194:
195: /**
196: * Returns the indication whether <b>Substance</b> should enable negated
197: * color themes.
198: *
199: * @return <code>true</code> if <b>Substance</b> should enable negated
200: * color themes, <code>false</code> otherwise.
201: */
202: public boolean toEnableNegatedThemes();
203:
204: /**
205: * Returns the indication whether <b>Substance</b> is running the
206: * application under debug UI mode.
207: *
208: * @return <code>true</code> if <b>Substance</b> is running the
209: * application under debug UI mode, <code>false</code> otherwise.
210: */
211: public boolean isDebugUiMode();
212: }
|