All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jppf.ui.options.xml.OptionDescriptor Maven / Gradle / Ivy

There is a newer version: 6.3-alpha
Show newest version
/*
 * JPPF.
 * Copyright (C) 2005-2015 JPPF Team.
 * http://www.jppf.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jppf.ui.options.xml;

import java.io.Serializable;
import java.util.*;

import org.jppf.utils.TypedProperties;

/**
 * Instances of this class are used to represented an XML document describing an options page.
 * @author Laurent Cohen
 */
public class OptionDescriptor extends TypedProperties
{
  /**
   * Explicit serialVersionUID.
   */
  private static final long serialVersionUID = 1L;
  /**
   * Type of option component.
   * The possible values are:
   * 
    *
  • "page" for an options page
  • *
  • "FormattedNumber" for a formatted number text field
  • *
  • "SpinnerNumber" for numbers edited with a spinner control
  • *
  • "TextArea" for a text area option
  • *
  • "Boolean" for a checkbox option
  • *
  • "ComboBox" for dropdown lists
  • *
  • "PlainText" for a simple, single-line text field
  • *
  • "Button" for a button
  • *
  • "Password" for a password field
  • *
*/ public String type = null; /** * Name of the option element. */ public String name = null; /** * Path to the folder containing the localized resource bundles for a page (doesn't apply to non-page elements). */ public String i18n = null; /** * Children of this option element. */ public List children = new ArrayList<>(); /** * Listeners of this option element. */ public List listeners = new ArrayList<>(); /** * Items used in list boxes or combo boxes. */ public List items = new ArrayList<>(); /** * Items used in list boxes or combo boxes. */ public List scripts = new ArrayList<>(); /** * Initializer. */ public ListenerDescriptor initializer = null; /** * Finalizer. */ public ListenerDescriptor finalizer = null; /** * Mouse listener. */ public ListenerDescriptor mouseListener = null; /** * Descriptor for listeners set on option elements. */ public static class ListenerDescriptor implements Serializable { /** * Explicit serialVersionUID. */ private static final long serialVersionUID = 1L; /** * Type of listener. * The possible values are: *
    *
  • "action" for an action listener set on a button
  • *
  • "value" for a ValueChangeListener
  • *
*/ public String type = null; /** * Name of the listener class to instantiate to set the listener on an option element, * if this listener is Java-based. */ public String className = null; /** * The source of the script to execute if this listener is script-based. */ public ScriptDescriptor script = null; } /** * Descriptor for script elements. */ public static class ScriptDescriptor implements Serializable { /** * Explicit serialVersionUID. */ private static final long serialVersionUID = 1L; /** * The content of the script to execute if this listener is script-based. */ public String content = null; /** * The language in which the script is written, for instance JavaScript, Groovy, etc. */ public String language = null; /** * The source of the script content, can be either a file path or a url, or null if the script is inlined. */ public String source = null; } /** * Descriptor for listeners set on option elements. */ public static class ItemDescriptor implements Serializable { /** * Explicit serialVersionUID. */ private static final long serialVersionUID = 1L; /** * The name of this item. */ public String name = null; /** * Name of the listener class to instantiate to set the listener on an option element. */ public String selected = null; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy