📄 layertagbuilder.java
字号:
/*
* License
*
* The contents of this file are subject to the Jabber Open Source License
* Version 1.0 (the "License"). You may not copy or use this file, in either
* source code or executable form, except in compliance with the License. You
* may obtain a copy of the License at http://www.jabber.com/license/ or at
* http://www.opensource.org/.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Copyrights
*
* Portions created by or assigned to Jabber.com, Inc. are
* Copyright (c) 2000 Jabber.com, Inc. All Rights Reserved. Contact
* information for Jabber.com, Inc. is available at http://www.jabber.com/.
*
* Portions Copyright (c) 1999-2000 David Waite
*
* Acknowledgements
*
* Special thanks to the Jabber Open Source Contributors for their
* suggestions and support of Jabber.
*
* Changes
*
* @author David Waite <a href="mailto:dwaite@jabber.com">
* <i><dwaite@jabber.com></i></a>
* @author $Author: chris $
* @version $Revision: 1.1 $
*
* j.komzak
* Changed into LayerTagBuilder
*/
package edu.ou.kmi.buddyspace.plugins.maps.xml;
/*
* LayerTagBuilder.java
*
* Project: BuddySpace
* (C) Copyright Knowledge Media Institute 2002
*
*
* Created on 16 August 2002, 10:20
*/
import java.util.Vector;
import org.jabber.jabberbeans.Extension.*;
/**
* <code>LayerTagBuilder</code> is used to construct LayerTag objects
*
* @author Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
*/
public class LayerTagBuilder
implements ExtensionBuilder
{
/** Vector of ItemTag and ClusterTag objects contained. */
private Vector itemList;
private ImgTag img = null;
private String id = null;
private String offsetX = null;
private String offsetY = null;
private String scale = null;
private String priority = null;
private String src = null;
/** Creates a new <code>LayerTagBuilder</code> instance. */
public LayerTagBuilder()
{ reset(); }
/**
* <code>reset</code> the builder to a default state, so it can be reused.
*/
public void reset() {
itemList = new Vector();
id = null;
offsetX = null;
offsetY = null;
scale = null;
priority = null;
src = null;
}
public void setImg(ImgTag newImg) {
img = newImg;
}
public ImgTag getImg() {
return img;
}
public void setID(String newID) {
id = newID;
}
public String getID() {
return id;
}
public void setOffsetX(String newOffsetX) {
offsetX = newOffsetX;
}
public String getOffsetX() {
return offsetX;
}
public void setOffsetY(String newOffsetY) {
offsetY = newOffsetY;
}
public String getOffsetY() {
return offsetY;
}
public void setScale(String newScale) {
scale = newScale;
}
public String getScale() {
return scale;
}
public void setPriority(String newPriority) {
priority = newPriority;
}
public String getPriority() {
return priority;
}
public void setSrc(String newSrc) {
src = newSrc;
}
public String getSrc() {
return src;
}
/**
* <code>addItem</code> adds a new item object to the end of this
* list.
*
* @param item an <code>Agent</code> value
*/
public void addItem(ItemTag item)
{
if (!itemList.contains(item))
itemList.addElement(item);
}
/**
* <code>delItem</code> removes an item from this list, if it is present
*
* @param item an <code>ItemTag</code> value
*/
public void delItem(ItemTag item)
{
if (itemList.contains(item))
itemList.removeElement(item);
}
/**
* <code>addCluster</code> adds a new cluster object to the end of this
* list.
*
* @param cluster an <code>ClusterTag</code> value
*/
public void addCluster(ClusterTag cluster)
{
if (!itemList.contains(cluster))
itemList.addElement(cluster);
}
/**
* <code>delCluster</code> removes an cluster from this list, if it is present
*
* @param cluster an <code>ClusterTag</code> value
*/
public void delCluster(ClusterTag cluster)
{
if (itemList.contains(cluster))
itemList.removeElement(cluster);
}
/**
* <code>getItemsAndClusters</code> returns the vector representing the
* item and cluster objects associated with this object.
*
* @return a <code>Vector</code> value
*/
public Vector getItemsAndClusters()
{ return itemList; }
/**
* <code>build</code> a new LayerTag object
*
* @return an <code>Extension</code> value
* @exception InstantiationException if insufficient or incorrect data
* was proviced.
*/
public Extension build()
throws InstantiationException
{ return new LayerTag(this); }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -