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: * IUnMenu the the common interface to all menu widgets
042: * </p>
043: */
044: public interface IUnMenu extends IUnComponent {
045:
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 IUnMenu create() {
067: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
068: .pcmf_getObjByName(IUnApplication.MY_APPL);
069: return (l_appl.pcmf_getComponentFactory().pcmf_createMenu(
070: l_appl.pcmf_getApplType(), "", null, 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 IUnMenu create(String xFactoryDesc) {
085: IUnApplication l_appl = (IUnApplication) KeRegisteredObject
086: .pcmf_getObjByName(IUnApplication.MY_APPL);
087: return (l_appl.pcmf_getComponentFactory()
088: .pcmf_createMenuPlugin(l_appl.pcmf_getApplType(),
089: "", null, l_appl, xFactoryDesc));
090: }
091:
092: /**
093: * Creates a standard version of this component as described in the factory
094: * within the given application-context. If you create masses of components
095: * for e.g. within a renderer use this method for performance reasons.
096: *
097: * @param xAppl
098: * application in which context the component is created
099: * @return new component
100: */
101: public static IUnMenu create(IUnApplication xAppl) {
102: return (xAppl.pcmf_getComponentFactory().pcmf_createMenu(
103: xAppl.pcmf_getApplType(), "", null, xAppl));
104: }
105:
106: /**
107: * Creates a special version of this component as described in the factory
108: * configuration under the descriptor xFactoryDesc. If you create masses of
109: * components for e.g. within a renderer use this function for performance
110: * reasons.
111: *
112: * @param xFactoryDesc
113: * descriptor
114: * @param xAppl
115: * application in which context the component is created
116: * @return new component
117: */
118: public static IUnMenu create(IUnApplication xAppl,
119: String xFactoryDesc) {
120: return (xAppl.pcmf_getComponentFactory()
121: .pcmf_createMenuPlugin(xAppl.pcmf_getApplType(),
122: "", null, xAppl, xFactoryDesc));
123: }
124: }
125:
126: /**
127: * <p>
128: * Commits the menu. After a commit the menu is reinitialised. This becomes
129: * necessary when menuitems in case of adding or removing items.
130: * </p>
131: * <p>
132: *
133: * </p>
134: * <p>
135: * </p>
136: */
137: public void pcmf_commitMenu();
138:
139: /**
140: * <p>
141: * Sets the width of the menu entries
142: * </p>
143: * <p>
144: *
145: * @param xWi
146: * width in pixel
147: * </p>
148: * <p>
149: * </p>
150: */
151: public void pcmf_setMenuWidth(int xWi);
152: }
|