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: 30.12.2003 project: WiSer-Framework
039: *
040: * <p>
041: * IUnSeparator is the common interface to a horizontal separator line
042: * </p>
043: */
044: public interface IUnSeparator extends IUnComponent {
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: * @param xLen length of the lie in pixel, 0 means use all horizontal place
064: * @return new component
065: */
066: public static IUnSeparator create(int xLen) {
067: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
068: .pcmf_getObjByName(IUnApplication.MY_APPL);
069: return (l_appl.pcmf_getComponentFactory().pcmf_createLine(
070: l_appl.pcmf_getApplType(), "", xLen, 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 xLen length of the lie in pixel, 0 means use all horizontal place
081: * @param xFactoryDesc
082: * descriptor
083: * @return new component
084: */
085: public static IUnSeparator create(int xLen, String xFactoryDesc) {
086: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
087: .pcmf_getObjByName(IUnApplication.MY_APPL);
088: return (l_appl.pcmf_getComponentFactory()
089: .pcmf_createLinePlugin(l_appl.pcmf_getApplType(),
090: "", xLen, 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 xLen length of the lie in pixel, 0 means use all horizontal place
099: * @param xAppl
100: * application in which context the component is created
101: * @return new component
102: */
103: public static IUnSeparator create(int xLen, IUnApplication xAppl) {
104: return (xAppl.pcmf_getComponentFactory().pcmf_createLine(
105: xAppl.pcmf_getApplType(), "", xLen, 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 xLen length of the lie in pixel, 0 means use all horizontal place
115: * @param xFactoryDesc
116: * descriptor
117: * @param xAppl
118: * application in which context the component is created
119: * @return new component
120: */
121: public static IUnSeparator create(int xLen,
122: IUnApplication xAppl, String xFactoryDesc) {
123: return (xAppl.pcmf_getComponentFactory()
124: .pcmf_createLinePlugin(xAppl.pcmf_getApplType(),
125: "", xLen, xAppl, xFactoryDesc));
126: }
127: }
128: }
|