001: //** Copyright Statement ***************************************************
002: //The Salmon Open Framework for Internet Applications (SOFIA)
003: // Copyright (C) 1999 - 2002, Salmon LLC
004: //
005: // This program is free software; you can redistribute it and/or
006: // modify it under the terms of the GNU General Public License version 2
007: // as published by the Free Software Foundation;
008: //
009: // This program is distributed in the hope that it will be useful,
010: // but WITHOUT ANY WARRANTY; without even the implied warranty of
011: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: // GNU General Public License for more details.
013: //
014: // You should have received a copy of the GNU General Public License
015: // along with this program; if not, write to the Free Software
016: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
017: //
018: // For more information please visit http://www.salmonllc.com
019: //** End Copyright Statement ***************************************************
020: package com.salmonllc.html;
021:
022: /////////////////////////
023: //$Archive: /JADE/SourceCode/com/salmonllc/html/HtmlFrame.java $
024: //$Author: Dan $
025: //$Revision: 8 $
026: //$Modtime: 10/30/02 2:58p $
027: /////////////////////////
028:
029: /**
030: * This class is used in conjunction with HtmlFrameset. A frameset is componed of two or more HtmlFrames.
031: * @see HtmlFrameset
032: */
033: public class HtmlFrame {
034: public static final int SIZE_PERCENT = 0;
035: public static final int SIZE_PIXELS = 1;
036:
037: public static final int SCROLLBARS_YES = 0;
038: public static final int SCROLLBARS_NO = 1;
039: public static final int SCROLLBARS_AUTO = 2;
040:
041: private String _name = "";
042: private boolean _resize = true;
043: private int _scroll = SCROLLBARS_AUTO;
044: private String _url = "";
045: private int _size = -1;
046: private int _sizeMethod = SIZE_PIXELS;
047:
048: /**
049: * Creates a new HtmlFrame.
050: */
051: public HtmlFrame() {
052: super ();
053: }
054:
055: /**
056: * This method gets the name of the frame
057: */
058: public String getName() {
059: return _name;
060: }
061:
062: /**
063: * This method gets whether or not the frame is resizeable.
064: */
065: public boolean getResize() {
066: return _resize;
067: }
068:
069: /**
070: * This method gets whether or not the frame has scroll bars. Valid values are SCROLLBARS_YES,SCROLLBARS_NO and SCROLLBARS_AUTO.
071: */
072: public int getScrollBars() {
073: return _scroll;
074: }
075:
076: /**
077: * This method gets the size of the frame. A value <= 0 will cause the frame to use all available space.
078: */
079: public int getSize() {
080: return _size;
081: }
082:
083: /**
084: * This method gets the size method for the frame. Valid values are SIZE_PIXELS or SIZE_PERCENT.
085: */
086: public int getSizeMethod() {
087: return _sizeMethod;
088: }
089:
090: /**
091: * This method gets the URL of the source page of the frame.
092: */
093: public String getURL() {
094: return _url;
095: }
096:
097: /**
098: * This method sets the name of the frame
099: */
100: public void setName(String value) {
101: _name = value;
102: }
103:
104: /**
105: * This method sets whether or not the frame is resizeable.
106: */
107: public void setResize(boolean value) {
108: _resize = value;
109: }
110:
111: /**
112: * This method sets whether or not the frame has scroll bars. Valid values are SCROLLBARS_YES,SCROLLBARS_NO and SCROLLBARS_AUTO.
113: */
114: public void setScrollBars(int value) {
115: _scroll = value;
116: }
117:
118: /**
119: * This method sets the size of the frame. A value <= 0 will cause the frame to use all available space.
120: */
121: public void setSize(int size) {
122: _size = size;
123: }
124:
125: /**
126: * This method sets the size method for the frame. Valid values are SIZE_PIXELS or SIZE_PERCENT.
127: */
128: public void setSizeMethod(int value) {
129: _sizeMethod = value;
130: }
131:
132: /**
133: * This method sets the URL of the source page of the frame.
134: */
135: public void setURL(String value) {
136: _url = value;
137: }
138: }
|