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: 15.03.2004 project: WiSer-Framework
039: *
040: * <p>
041: * IUnLink is the common interface to link-widgets
042: * </p>
043: */
044: public interface IUnLink extends IUnIconView, IUnComponent,
045: 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
053: * interface's type without taking care for the WidgetServer MultiChannel API.
054: * It's use is similar to a 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 <i>
061: * create(IUnApplication xAppl)</i> for performance reasons.
062: *
063: * @param xLabel
064: * the label of the link
065: * @return new component
066: */
067: public static IUnLink create(String xLabel) {
068: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
069: .pcmf_getObjByName(IUnApplication.MY_APPL);
070: return (l_appl.pcmf_getComponentFactory().pcmf_createLink(
071: l_appl.pcmf_getApplType(), xLabel, 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> create(IUnApplication
078: * xAppl, String xFactoryDesc)</i> for performance reasons.
079: *
080: * @param xLabel
081: * the label of the link
082: * @param xFactoryDesc
083: * descriptor
084: * @return new component
085: */
086: public static IUnLink create(String xLabel, String xFactoryDesc) {
087: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
088: .pcmf_getObjByName(IUnApplication.MY_APPL);
089: return (l_appl.pcmf_getComponentFactory()
090: .pcmf_createLinkPlugin(l_appl.pcmf_getApplType(),
091: xLabel, l_appl, xFactoryDesc));
092: }
093:
094: /**
095: * Creates a standard version of this component as described in the factory
096: * within the given application-context. If you create masses of components
097: * for e.g. within a renderer use this method for performance reasons.
098: *
099: * @param xLabel
100: * the label of the link
101: * @param xAppl
102: * application in which context the component is created
103: * @return new component
104: */
105: public static IUnLink create(String xLabel, IUnApplication xAppl) {
106: return (xAppl.pcmf_getComponentFactory().pcmf_createLink(
107: xAppl.pcmf_getApplType(), xLabel, xAppl));
108: }
109:
110: /**
111: * Creates a special version of this component as described in the factory
112: * configuration under the descriptor xFactoryDesc. If you create masses of
113: * components for e.g. within a renderer use this function for performance
114: * reasons.
115: *
116: * @param xLabel
117: * the label of the link
118: * @param xFactoryDesc
119: * descriptor
120: * @param xAppl
121: * application in which context the component is created
122: * @return new component
123: */
124: public static IUnLink create(String xLabel,
125: IUnApplication xAppl, String xFactoryDesc) {
126: return (xAppl.pcmf_getComponentFactory()
127: .pcmf_createLinkPlugin(xAppl.pcmf_getApplType(),
128: xLabel, xAppl, xFactoryDesc));
129: }
130: }
131:
132: /**
133: * <p>
134: * Sets the text alignment to EAST or WEST
135: * </p>
136: * <p>
137: *
138: * </p>
139: * <p>
140: *
141: * @param xAlign
142: * Alignment can be ALIGN_EAST, ALIGN_CENTER or ALIGN_WEST
143: * </p>
144: */
145: public void pcmf_setTextAlign(int xAlign);
146:
147: /**
148: * <p>
149: * Gets the text alignment mode
150: * </p>
151: * <p>
152: *
153: * @return ALIGN_EAST, ALIGN_CENTER or ALIGN_WEST
154: * </p>
155: * <p>
156: * </p>
157: */
158: public int pcmf_getTextAlign();
159: }
|