001: /* *************************************************************************
002:
003: Millstone(TM)
004: Open Sourced User Interface Library for
005: Internet Development with Java
006:
007: Millstone is a registered trademark of IT Mill Ltd
008: Copyright (C) 2000-2005 IT Mill Ltd
009:
010: *************************************************************************
011:
012: This library is free software; you can redistribute it and/or
013: modify it under the terms of the GNU Lesser General Public
014: license version 2.1 as published by the Free Software Foundation.
015:
016: This library is distributed in the hope that it will be useful,
017: but WITHOUT ANY WARRANTY; without even the implied warranty of
018: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: Lesser General Public License for more details.
020:
021: You should have received a copy of the GNU Lesser General Public
022: License along with this library; if not, write to the Free Software
023: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024:
025: *************************************************************************
026:
027: For more information, contact:
028:
029: IT Mill Ltd phone: +358 2 4802 7180
030: Ruukinkatu 2-4 fax: +358 2 4802 7181
031: 20540, Turku email: info@itmill.com
032: Finland company www: www.itmill.com
033:
034: Primary source for MillStone information and releases: www.millstone.org
035:
036: ********************************************************************** */
037:
038: package org.millstone.base.terminal;
039:
040: /** Scrollable interface.
041: *
042: * <p>This interface is implemented by all visual objects that can be scrolled.
043: * The unit of scrolling is pixel.</p>
044: *
045: * @author IT Mill Ltd.
046: * @version 3.1.1
047: * @since 3.0
048: */
049: public interface Scrollable {
050:
051: /** Get scroll X offset.
052: *
053: * <p>Scrolling offset is the number of pixels this scrollable has
054: * been scrolled to left.</p>
055: *
056: * @return Horizontal scrolling position in pixels.
057: */
058: public int getScrollOffsetX();
059:
060: /** Set scroll X offset.
061: *
062: * <p>Scrolling offset is the number of pixels this scrollable has
063: * been scrolled to left.</p>
064: *
065: * @param xOffset.
066: */
067: public void setScrollOffsetX(int pixelsScrolledLeft);
068:
069: /** Get scroll Y offset.
070: *
071: * <p>Scrolling offset is the number of pixels this scrollable has
072: * been scrolled to down.</p>
073: *
074: * @return Vertical scrolling position in pixels.
075: */
076: public int getScrollOffsetY();
077:
078: /** Set scroll Y offset.
079: *
080: * <p>Scrolling offset is the number of pixels this scrollable has
081: * been scrolled to down.</p>
082: *
083: * @param yOffset.
084: */
085: public void setScrollOffsetY(int pixelsScrolledDown);
086:
087: /** Is the scrolling enabled.
088: *
089: * <p>Enabling scrolling allows the user to scroll the scrollable view
090: * interactively</p>
091: *
092: * @return True iff the scrolling is allowed.
093: */
094: public boolean isScrollable();
095:
096: /** Enable or disable scrolling..
097: *
098: * <p>Enabling scrolling allows the user to scroll the scrollable view
099: * interactively</p>
100: *
101: * @param isScrollingEnabled True iff the scrolling is allowed.
102: */
103: public void setScrollable(boolean isScrollingEnabled);
104:
105: }
|