⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contextmenus.java

📁 CRM源码This file describes some issues that should be implemented in future and how it should be imple
💻 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;

/**
 * The collection of context menus
 * 
 * @version $Revision$ $Date$
 */
public class ContextMenus extends com.queplix.core.utils.jxb.JXBObject 
implements java.io.Serializable
{


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * The context menu description
     */
    private java.util.ArrayList _contextMenuList;


      //----------------/
     //- Constructors -/
    //----------------/

    public ContextMenus() 
     {
        super();
        _contextMenuList = new ArrayList();
    } //-- com.queplix.core.modules.config.jxb.ContextMenus()


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addContextMenu
     * 
     * 
     * 
     * @param vContextMenu
     */
    public void addContextMenu(com.queplix.core.modules.config.jxb.ContextMenu vContextMenu)
        throws java.lang.IndexOutOfBoundsException
    {
        _contextMenuList.add(vContextMenu);
    } //-- void addContextMenu(com.queplix.core.modules.config.jxb.ContextMenu) 

    /**
     * Method addContextMenu
     * 
     * 
     * 
     * @param index
     * @param vContextMenu
     */
    public void addContextMenu(int index, com.queplix.core.modules.config.jxb.ContextMenu vContextMenu)
        throws java.lang.IndexOutOfBoundsException
    {
        _contextMenuList.add(index, vContextMenu);
    } //-- void addContextMenu(int, com.queplix.core.modules.config.jxb.ContextMenu) 

    /**
     * Method clearContextMenu
     * 
     */
    public void clearContextMenu()
    {
        _contextMenuList.clear();
    } //-- void clearContextMenu() 

    /**
     * Method enumerateContextMenu
     * 
     * 
     * 
     * @return Enumeration
     */
    public java.util.Enumeration enumerateContextMenu()
    {
        return new org.exolab.castor.util.IteratorEnumeration(_contextMenuList.iterator());
    } //-- java.util.Enumeration enumerateContextMenu() 

    /**
     * Method getContextMenu
     * 
     * 
     * 
     * @param index
     * @return ContextMenu
     */
    public com.queplix.core.modules.config.jxb.ContextMenu getContextMenu(int index)
        throws java.lang.IndexOutOfBoundsException
    {
        //-- check bounds for index
        if ((index < 0) || (index > _contextMenuList.size())) {
            throw new IndexOutOfBoundsException();
        }
        
        return (com.queplix.core.modules.config.jxb.ContextMenu) _contextMenuList.get(index);
    } //-- com.queplix.core.modules.config.jxb.ContextMenu getContextMenu(int) 

    /**
     * Method getContextMenu
     * 
     * 
     * 
     * @return ContextMenu
     */
    public com.queplix.core.modules.config.jxb.ContextMenu[] getContextMenu()
    {
        int size = _contextMenuList.size();
        com.queplix.core.modules.config.jxb.ContextMenu[] mArray = new com.queplix.core.modules.config.jxb.ContextMenu[size];
        for (int index = 0; index < size; index++) {
            mArray[index] = (com.queplix.core.modules.config.jxb.ContextMenu) _contextMenuList.get(index);
        }
        return mArray;
    } //-- com.queplix.core.modules.config.jxb.ContextMenu[] getContextMenu() 

    /**
     * Method getContextMenuCount
     * 
     * 
     * 
     * @return int
     */
    public int getContextMenuCount()
    {
        return _contextMenuList.size();
    } //-- int getContextMenuCount() 

    /**
     * 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 removeContextMenu
     * 
     * 
     * 
     * @param vContextMenu
     * @return boolean
     */
    public boolean removeContextMenu(com.queplix.core.modules.config.jxb.ContextMenu vContextMenu)
    {
        boolean removed = _contextMenuList.remove(vContextMenu);
        return removed;
    } //-- boolean removeContextMenu(com.queplix.core.modules.config.jxb.ContextMenu) 

    /**
     * Method setContextMenu
     * 
     * 
     * 
     * @param index
     * @param vContextMenu
     */
    public void setContextMenu(int index, com.queplix.core.modules.config.jxb.ContextMenu vContextMenu)
        throws java.lang.IndexOutOfBoundsException
    {
        //-- check bounds for index
        if ((index < 0) || (index > _contextMenuList.size())) {
            throw new IndexOutOfBoundsException();
        }
        _contextMenuList.set(index, vContextMenu);
    } //-- void setContextMenu(int, com.queplix.core.modules.config.jxb.ContextMenu) 

    /**
     * Method setContextMenu
     * 
     * 
     * 
     * @param contextMenuArray
     */
    public void setContextMenu(com.queplix.core.modules.config.jxb.ContextMenu[] contextMenuArray)
    {
        //-- copy array
        _contextMenuList.clear();
        for (int i = 0; i < contextMenuArray.length; i++) {
            _contextMenuList.add(contextMenuArray[i]);
        }
    } //-- void setContextMenu(com.queplix.core.modules.config.jxb.ContextMenu) 

    /**
     * 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.ContextMenus) Unmarshaller.unmarshal(com.queplix.core.modules.config.jxb.ContextMenus.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 + -