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: import de.ug2t.unifiedGui.*;
035:
036: public interface IUnRadioButton extends IUnInputComponent, IUnIconView,
037: IUnComponent, IUnKeyAccess {
038: public static String CHECKED = "CHECKED";
039: public static String NOTCHECKED = "NOTCHECKED";
040:
041: /**
042: * @author Dirk
043: *
044: * date: 29.05.2007 project: WiSer-Framework
045: *
046: * <p>
047: * Factory is a convenience class to create components of the surrounding
048: * interface's type without taking care for the WidgetServer MultiChannel API.
049: * It's use is similar to a constructor.
050: * </p>
051: */
052: public static class Factory {
053: /**
054: * Creates a standard version of this component as described in the factory.
055: * If you create masses of components for e.g. within a renderer use
056: * <i> create(IUnApplication xAppl)</i> for performance
057: * reasons.
058: *
059: * @param xLabel
060: * label of the radio button
061: * @param xGroup
062: * group to which the button belongs
063: * @return new component
064: */
065: public static IUnRadioButton create(String xLabel, String xGroup) {
066: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
067: .pcmf_getObjByName(IUnApplication.MY_APPL);
068: return (l_appl.pcmf_getComponentFactory()
069: .pcmf_createSingleRadioButtons(l_appl
070: .pcmf_getApplType(), "",
071: IUnRadioButton.NOTCHECKED, xLabel, xGroup,
072: l_appl));
073: }
074:
075: /**
076: * Creates a special version of this component as described in the factory
077: * configuration under the descriptor xFactoryDesc. If you create masses of
078: * components for e.g. within a renderer use <i>
079: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
080: * reasons.
081: *
082: * @param xLabel
083: * label of the radio button
084: * @param xGroup
085: * group to which the button belongs
086: * @param xFactoryDesc
087: * descriptor
088: * @return new component
089: */
090: public static IUnRadioButton create(String xLabel,
091: String xGroup, String xFactoryDesc) {
092: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
093: .pcmf_getObjByName(IUnApplication.MY_APPL);
094: return (l_appl.pcmf_getComponentFactory()
095: .pcmf_createSingleRadioButtonsPlugin(l_appl
096: .pcmf_getApplType(), "",
097: IUnRadioButton.NOTCHECKED, xLabel, xGroup,
098: l_appl, xFactoryDesc));
099: }
100:
101: /**
102: * Creates a standard version of this component as described in the factory
103: * within the given application-context. If you create masses of components
104: * for e.g. within a renderer use this method for performance reasons.
105: *
106: * @param xLabel
107: * label of the radio button
108: * @param xGroup
109: * group to which the button belongs
110: * @param xAppl
111: * application in which context the component is created
112: * @return new component
113: */
114: public static IUnRadioButton create(String xLabel,
115: String xGroup, IUnApplication xAppl) {
116: return (xAppl.pcmf_getComponentFactory()
117: .pcmf_createSingleRadioButtons(xAppl
118: .pcmf_getApplType(), "",
119: IUnRadioButton.NOTCHECKED, xLabel, xGroup,
120: xAppl));
121: }
122:
123: /**
124: * Creates a special version of this component as described in the factory
125: * configuration under the descriptor xFactoryDesc. If you create masses of
126: * components for e.g. within a renderer use this function for performance
127: * reasons.
128: *
129: * @param xLabel
130: * label of the radio button
131: * @param xGroup
132: * group to which the button belongs
133: * @param xFactoryDesc
134: * descriptor
135: * @param xAppl
136: * application in which context the component is created
137: * @return new component
138: */
139: public static IUnRadioButton create(String xLabel,
140: String xGroup, IUnApplication xAppl, String xFactoryDesc) {
141: return (xAppl.pcmf_getComponentFactory()
142: .pcmf_createSingleRadioButtonsPlugin(xAppl
143: .pcmf_getApplType(), "",
144: IUnRadioButton.NOTCHECKED, xLabel, xGroup,
145: xAppl, xFactoryDesc));
146: }
147: }
148:
149: public UnButtonGroup pcmf_getGroup();
150: }
|