001: /*
002: * Copyright 2005 jWic group (http://www.jwic.de)
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: *
016: * de.jwic.controls.IHTMLElement
017: * Created on 09.08.2006
018: * $Id: IHTMLElement.java,v 1.3 2006/08/17 10:19:20 lordsam Exp $
019: */
020: package de.jwic.controls;
021:
022: import de.jwic.base.IControl;
023:
024: /**
025: * Specifies common properties for controls that represent a basic HTML element.
026: *
027: * @author Florian Lippisch
028: * @version $Revision: 1.3 $
029: */
030: public interface IHTMLElement extends IControl {
031:
032: /**
033: * Returns the CSS class.
034: * @return Returns the cssClass.
035: */
036: public abstract String getCssClass();
037:
038: /**
039: * Sets the CSS class to assign to the html element. If set to null, no class
040: * will be assigned.
041: * @param cssClass The cssClass to set.
042: */
043: public abstract void setCssClass(String cssClass);
044:
045: /**
046: * @return Returns true if the element is enabled.
047: */
048: public abstract boolean isEnabled();
049:
050: /**
051: * @param enabled set to true to enable the element.
052: */
053: public abstract void setEnabled(boolean enabled);
054:
055: /**
056: * Returns the height of the element. Returns 0 if the height is
057: * not specified.
058: * @return Returns the height.
059: */
060: public abstract int getHeight();
061:
062: /**
063: * Sets the height of the element in 'px'. The height is set via the
064: * css height attribute. If set to 0, no height is assigned.
065: * @param height The height to set.
066: */
067: public abstract void setHeight(int height);
068:
069: /**
070: * Returns the width of the element. Returns 0 if the width is
071: * not specified.
072: * @return Returns the width.
073: */
074: public abstract int getWidth();
075:
076: /**
077: * Sets the width of the element in 'px'. The width is set via the
078: * css width attribute. If set to 0, no width is assigned.
079: * @param width The width to set.
080: */
081: public abstract void setWidth(int width);
082:
083: /**
084: * Indicates if the width of the control is 100% to fill the available space.
085: * @return Returns the fillWidth.
086: */
087: public boolean isFillWidth();
088:
089: /**
090: * Sets the width of the control to 100% to fill the available space.
091: * @param fillWidth The fillWidth to set.
092: */
093: public void setFillWidth(boolean fillWidth);
094:
095: /**
096: * Forces focus for this control. Returns <code>true</code> if the
097: * control could have been set.
098: */
099: public boolean forceFocus();
100: }
|