001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library located in LGPL.txt in the
021: * license directory; if not, write to the
022: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
023: * Boston, MA 02111-1307, USA.
024: *
025: * If this agreement does not cover your requirements, please contact us
026: * via email to get detailed information about the commercial license
027: * or our service offerings!
028: *
029: */
030: // @@
031: package de.ug2t.unifiedGui.interfaces;
032:
033: import de.ug2t.kernel.*;
034:
035: /**
036: * @author Dirk
037: *
038: * date: 08.08.2007 project: WiSer-Framework
039: *
040: * <p>
041: * This is the common interface to spinner widgets
042: * </p>
043: */
044: public interface IUnSpinner extends IUnListComponent {
045: /**
046: * @author Dirk
047: *
048: * date: 29.05.2007 project: WiSer-Framework
049: *
050: * <p>
051: * Factory is a convenience class to create components of the surrounding interface's type without
052: * taking care for the WidgetServer MultiChannel API. It's use is similar to a
053: * constructor.
054: * </p>
055: */
056: public static class Factory {
057: /**
058: * Creates a standard version of this component as described in the factory.
059: * If you create masses of components for e.g. within a renderer use
060: * <i> create(IUnApplication xAppl)</i> for performance
061: * reasons.
062: *
063: * @return new component
064: */
065: public static IUnSpinner create() {
066: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
067: .pcmf_getObjByName(IUnApplication.MY_APPL);
068: return (l_appl.pcmf_getComponentFactory()
069: .pcmf_createSpinner(l_appl.pcmf_getApplType(), "",
070: l_appl));
071: }
072:
073: /**
074: * Creates a special version of this component as described in the factory
075: * configuration under the descriptor xFactoryDesc. If you create masses of
076: * components for e.g. within a renderer use <i>
077: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
078: * reasons.
079: *
080: * @param xFactoryDesc
081: * descriptor
082: * @return new component
083: */
084: public static IUnSpinner create(String xFactoryDesc) {
085: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
086: .pcmf_getObjByName(IUnApplication.MY_APPL);
087: return (l_appl.pcmf_getComponentFactory()
088: .pcmf_createSpinnerPlugin(
089: l_appl.pcmf_getApplType(), "", l_appl,
090: xFactoryDesc));
091: }
092:
093: /**
094: * Creates a standard version of this component as described in the factory
095: * within the given application-context. If you create masses of components
096: * for e.g. within a renderer use this method for performance reasons.
097: *
098: * @param xAppl
099: * application in which context the component is created
100: * @return new component
101: */
102: public static IUnSpinner create(IUnApplication xAppl) {
103: return (xAppl.pcmf_getComponentFactory()
104: .pcmf_createSpinner(xAppl.pcmf_getApplType(), "",
105: xAppl));
106: }
107:
108: /**
109: * Creates a special version of this component as described in the factory
110: * configuration under the descriptor xFactoryDesc. If you create masses of
111: * components for e.g. within a renderer use this function for performance
112: * reasons.
113: *
114: * @param xFactoryDesc
115: * descriptor
116: * @param xAppl
117: * application in which context the component is created
118: * @return new component
119: */
120: public static IUnSpinner create(IUnApplication xAppl,
121: String xFactoryDesc) {
122: return (xAppl.pcmf_getComponentFactory()
123: .pcmf_createSpinnerPlugin(xAppl.pcmf_getApplType(),
124: "", xAppl, xFactoryDesc));
125: }
126: }
127:
128: /**
129: * <p>
130: * Spins one value up
131: * </p>
132: */
133: public void pcmf_spinUp();
134:
135: /**
136: * <p>
137: * Spins one value down
138: * </p>
139: */
140: public void pcmf_spinDown();
141:
142: /**
143: * <p>
144: * Sets the text alignment to EAST or WEST
145: * </p>
146: * <p>
147: *
148: * </p>
149: * <p>
150: *
151: * @param xAlign
152: * Alignment can be ALIGN_EAST, ALIGN_CENTER or ALIGN_WEST
153: * </p>
154: */
155: public void pcmf_setTextAlign(int xAlign);
156:
157: /**
158: * <p>
159: * Gets the text alignment mode
160: * </p>
161: * <p>
162: *
163: * @return ALIGN_EAST, ALIGN_CENTER or ALIGN_WEST
164: * </p>
165: * <p>
166: * </p>
167: */
168: public int pcmf_getTextAlign();
169: }
|