Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


ChoiceCallbackjavax.security.auth.callback

Java 1.4serializable

A
Callback of this type represents a
request to display set of text choices and allow the user to select
one or more of them. A CallbackHandler, should
display the prompt returned by getPrompt( ) and
also the strings returned by getChoices( ). If
allowMultipleSelections( ) is
true, then it should allow the user to select zero
or more; otherwise, it should only allow the user to select a single
one. In either case, the CallbackHandler should
also call geTDefaultChoice( ) and make the choice
at the returned index the default choice. When the user has made her
selection, the CallbackHandler should pass the
index of a single selection to setSelectedIndex(
), or the indexes of multiple selections to
setSelectedIndexes( ).


Figure 19-6. javax.security.auth.callback.ChoiceCallback

public class

ChoiceCallback implements Callback, Serializable {
// Public Constructors
public

ChoiceCallback (String

prompt , String[ ]

choices , int

defaultChoice ,
boolean

multipleSelectionsAllowed );
// Public Instance Methods
public boolean

allowMultipleSelections ( );
public String[ ]

getChoices ( );
public int

getDefaultChoice ( );
public String

getPrompt ( );
public int[ ]

getSelectedIndexes ( );
public void

setSelectedIndex (int

selection );
public void

setSelectedIndexes (int[ ]

selections );
}



    / 1191