📄 buttons.java
字号:
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 0.9.7</a>, using an XML
* Schema.
* $Id$
*/
package com.queplix.core.modules.config.jxb;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Enumeration;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.ContentHandler;
/**
* Set of buttons which shall be added into form
*
* @version $Revision$ $Date$
*/
public class Buttons implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Either use all common actions by default or not
*/
private boolean _defaultactions = true;
/**
* keeps track of state for field: _defaultactions
*/
private boolean _has_defaultactions;
/**
* Button which shall be added into form
*/
private java.util.ArrayList _buttonList;
//----------------/
//- Constructors -/
//----------------/
public Buttons()
{
super();
_buttonList = new ArrayList();
} //-- com.queplix.core.modules.config.jxb.Buttons()
//-----------/
//- Methods -/
//-----------/
/**
* Method addButton
*
*
*
* @param vButton
*/
public void addButton(com.queplix.core.modules.config.jxb.Button vButton)
throws java.lang.IndexOutOfBoundsException
{
_buttonList.add(vButton);
} //-- void addButton(com.queplix.core.modules.config.jxb.Button)
/**
* Method addButton
*
*
*
* @param index
* @param vButton
*/
public void addButton(int index, com.queplix.core.modules.config.jxb.Button vButton)
throws java.lang.IndexOutOfBoundsException
{
_buttonList.add(index, vButton);
} //-- void addButton(int, com.queplix.core.modules.config.jxb.Button)
/**
* Method clearButton
*
*/
public void clearButton()
{
_buttonList.clear();
} //-- void clearButton()
/**
* Method deleteDefaultactions
*
*/
public void deleteDefaultactions()
{
this._has_defaultactions= false;
} //-- void deleteDefaultactions()
/**
* Method enumerateButton
*
*
*
* @return Enumeration
*/
public java.util.Enumeration enumerateButton()
{
return new org.exolab.castor.util.IteratorEnumeration(_buttonList.iterator());
} //-- java.util.Enumeration enumerateButton()
/**
* Method getButton
*
*
*
* @param index
* @return Button
*/
public com.queplix.core.modules.config.jxb.Button getButton(int index)
throws java.lang.IndexOutOfBoundsException
{
//-- check bounds for index
if ((index < 0) || (index > _buttonList.size())) {
throw new IndexOutOfBoundsException();
}
return (com.queplix.core.modules.config.jxb.Button) _buttonList.get(index);
} //-- com.queplix.core.modules.config.jxb.Button getButton(int)
/**
* Method getButton
*
*
*
* @return Button
*/
public com.queplix.core.modules.config.jxb.Button[] getButton()
{
int size = _buttonList.size();
com.queplix.core.modules.config.jxb.Button[] mArray = new com.queplix.core.modules.config.jxb.Button[size];
for (int index = 0; index < size; index++) {
mArray[index] = (com.queplix.core.modules.config.jxb.Button) _buttonList.get(index);
}
return mArray;
} //-- com.queplix.core.modules.config.jxb.Button[] getButton()
/**
* Method getButtonCount
*
*
*
* @return int
*/
public int getButtonCount()
{
return _buttonList.size();
} //-- int getButtonCount()
/**
* Returns the value of field 'defaultactions'. The field
* 'defaultactions' has the following description: Either use
* all common actions by default or not
*
* @return boolean
* @return the value of field 'defaultactions'.
*/
public boolean getDefaultactions()
{
return this._defaultactions;
} //-- boolean getDefaultactions()
/**
* Method hasDefaultactions
*
*
*
* @return boolean
*/
public boolean hasDefaultactions()
{
return this._has_defaultactions;
} //-- boolean hasDefaultactions()
/**
* Method isValid
*
*
*
* @return boolean
*/
public boolean isValid()
{
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
} //-- boolean isValid()
/**
* Method marshal
*
*
*
* @param out
*/
public void marshal(java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
Marshaller.marshal(this, out);
} //-- void marshal(java.io.Writer)
/**
* Method marshal
*
*
*
* @param handler
*/
public void marshal(org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
Marshaller.marshal(this, handler);
} //-- void marshal(org.xml.sax.ContentHandler)
/**
* Method removeButton
*
*
*
* @param vButton
* @return boolean
*/
public boolean removeButton(com.queplix.core.modules.config.jxb.Button vButton)
{
boolean removed = _buttonList.remove(vButton);
return removed;
} //-- boolean removeButton(com.queplix.core.modules.config.jxb.Button)
/**
* Method setButton
*
*
*
* @param index
* @param vButton
*/
public void setButton(int index, com.queplix.core.modules.config.jxb.Button vButton)
throws java.lang.IndexOutOfBoundsException
{
//-- check bounds for index
if ((index < 0) || (index > _buttonList.size())) {
throw new IndexOutOfBoundsException();
}
_buttonList.set(index, vButton);
} //-- void setButton(int, com.queplix.core.modules.config.jxb.Button)
/**
* Method setButton
*
*
*
* @param buttonArray
*/
public void setButton(com.queplix.core.modules.config.jxb.Button[] buttonArray)
{
//-- copy array
_buttonList.clear();
for (int i = 0; i < buttonArray.length; i++) {
_buttonList.add(buttonArray[i]);
}
} //-- void setButton(com.queplix.core.modules.config.jxb.Button)
/**
* Sets the value of field 'defaultactions'. The field
* 'defaultactions' has the following description: Either use
* all common actions by default or not
*
* @param defaultactions the value of field 'defaultactions'.
*/
public void setDefaultactions(boolean defaultactions)
{
this._defaultactions = defaultactions;
this._has_defaultactions = true;
} //-- void setDefaultactions(boolean)
/**
* Method unmarshal
*
*
*
* @param reader
* @return Object
*/
public static java.lang.Object unmarshal(java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
return (com.queplix.core.modules.config.jxb.Buttons) Unmarshaller.unmarshal(com.queplix.core.modules.config.jxb.Buttons.class, reader);
} //-- java.lang.Object unmarshal(java.io.Reader)
/**
* Method validate
*
*/
public void validate()
throws org.exolab.castor.xml.ValidationException
{
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
} //-- void validate()
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -