Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javafx.scene.control;
import javafx.collections.MapChangeListener;
import javafx.css.PseudoClass;
import javafx.beans.property.*;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.event.EventType;
import javafx.scene.AccessibleAction;
import javafx.scene.AccessibleAttribute;
/**
* Abstract base class for ComboBox-like controls. A ComboBox typically has
* a button that, when clicked, will pop up some means of allowing a user
* to select one or more values (depending on the implementation). This base
* class makes no assumptions about what happens when the {@link #show()} and
* {@link #hide()} methods are called, however commonly this results in either
* a popup or dialog appearing that allows for the user to provide the
* required information.
*
*
A ComboBox has a {@link #valueProperty() value} property that represents
* the current user input. This may be based on a selection from a drop-down list,
* or it may be from user input when the ComboBox is
* {@link #editableProperty() editable}.
*
*
An {@link #editableProperty() editable} ComboBox is one which provides some
* means for an end-user to provide input for values that are not otherwise
* options available to them. For example, in the {@link ComboBox} implementation,
* an editable ComboBox provides a {@link TextField} that may be typed into.
* As mentioned above, when the user commits textual input into the textfield
* (commonly by pressing the Enter keyboard key), the
* {@link #valueProperty() value} property will be updated.
*
*
The purpose of the separation between this class and, say, {@link ComboBox}
* is to allow for ComboBox-like controls that do not necessarily pop up a list
* of items. Examples of other implementations include color pickers, calendar
* pickers, etc. The {@link ComboBox} class provides the default, and most commonly
* expected implementation. Refer to that classes javadoc for more information.
*
* @see ComboBox
* @param The type of the value that has been selected or otherwise
* entered in to this ComboBox.
* @since JavaFX 2.1
*/
public abstract class ComboBoxBase extends Control {
/* *************************************************************************
* *
* Static properties and methods *
* *
**************************************************************************/
/**
*
Called prior to the ComboBox showing its popup/display after the user
* has clicked or otherwise interacted with the ComboBox.
* @since JavaFX 2.2
*/
public static final EventType ON_SHOWING =
new EventType<>(Event.ANY, "COMBO_BOX_BASE_ON_SHOWING");
/**
*
Called after the ComboBox has shown its popup/display.
* @since JavaFX 2.2
*/
public static final EventType ON_SHOWN =
new EventType<>(Event.ANY, "COMBO_BOX_BASE_ON_SHOWN");
/**
*
Called when the ComboBox popup/display will be hidden.
* @since JavaFX 2.2
*/
public static final EventType ON_HIDING =
new EventType<>(Event.ANY, "COMBO_BOX_BASE_ON_HIDING");
/**
*
Called when the ComboBox popup/display has been hidden.
* @since JavaFX 2.2
*/
public static final EventType ON_HIDDEN =
new EventType<>(Event.ANY, "COMBO_BOX_BASE_ON_HIDDEN");
/* *************************************************************************
* *
* Constructors *
* *
**************************************************************************/
/**
* Creates a default ComboBoxBase instance.
*/
public ComboBoxBase() {
getStyleClass().add(DEFAULT_STYLE_CLASS);
// Fix for RT-29885
getProperties().addListener((MapChangeListener