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: 26.11.2003 project: WiSer-Framework
039: *
040: * <p>
041: * This is the common interface to checkBox widgets
042: * </p>
043: */
044: public interface IUnButton extends IUnInputComponent, IUnIconView,
045: IUnComponent, IUnKeyAccess {
046: /**
047: * @author Dirk
048: *
049: * date: 29.05.2007 project: WiSer-Framework
050: *
051: * <p>
052: * Factory is a convenience class to create components of the surrounding interface's type without
053: * taking care for the WidgetServer MultiChannel API. It's use is similar to a
054: * constructor.
055: * </p>
056: */
057: public static class Factory {
058: /**
059: * Creates a standard version of this component as described in the factory.
060: * If you create masses of components for e.g. within a renderer use
061: * <i> create(IUnApplication xAppl)</i> for performance
062: * reasons.
063: *
064: * @return new component
065: */
066: public static IUnButton create() {
067: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
068: .pcmf_getObjByName(IUnApplication.MY_APPL);
069: return (l_appl.pcmf_getComponentFactory()
070: .pcmf_createButton(l_appl.pcmf_getApplType(), "",
071: l_appl));
072: }
073:
074: /**
075: * Creates a special version of this component as described in the factory
076: * configuration under the descriptor xFactoryDesc. If you create masses of
077: * components for e.g. within a renderer use <i>
078: * create(IUnApplication xAppl, String xFactoryDesc)</i> for performance
079: * reasons.
080: *
081: * @param xFactoryDesc
082: * descriptor
083: * @return new component
084: */
085: public static IUnButton create(String xFactoryDesc) {
086: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
087: .pcmf_getObjByName(IUnApplication.MY_APPL);
088: return (l_appl.pcmf_getComponentFactory()
089: .pcmf_createButtonPlugin(l_appl.pcmf_getApplType(),
090: "", l_appl, 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 IUnButton create(IUnApplication xAppl) {
103: return (xAppl.pcmf_getComponentFactory().pcmf_createButton(
104: xAppl.pcmf_getApplType(), "", xAppl));
105: }
106:
107: /**
108: * Creates a special version of this component as described in the factory
109: * configuration under the descriptor xFactoryDesc. If you create masses of
110: * components for e.g. within a renderer use this function for performance
111: * reasons.
112: *
113: * @param xFactoryDesc
114: * descriptor
115: * @param xAppl
116: * application in which context the component is created
117: * @return new component
118: */
119: public static IUnButton create(IUnApplication xAppl,
120: String xFactoryDesc) {
121: return (xAppl.pcmf_getComponentFactory()
122: .pcmf_createButtonPlugin(xAppl.pcmf_getApplType(),
123: "", xAppl, xFactoryDesc));
124: }
125: }
126: }
|