|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjavax.security.auth.callback.ChoiceCallback
public class ChoiceCallback
±âº»ÀÌ µÇ´Â ½ÃÅ¥·¯Æ¼ ¼ºñ½º¿¡¼´Â ChoiceCallback¸¦ ÀνºÅϽºÈÇØ CallbackHandler
handle ¸Þ¼µå¿¡ °Ç³×ÁÖ¾î, ¼±ÅûçÇ×ÀÇ ¸®½ºÆ®¸¦ Ç¥½ÃÇϰųª ¼±ÅÃµÈ ¼±ÅûçÇ×À» °ËÃâÇϰųª ÇÕ´Ï´Ù.
CallbackHandler,
Á÷·ÄÈ µÈ Çü½Ä | »ý¼ºÀÚ °³¿ä | |
|---|---|
ChoiceCallback (String prompt,
String [] choices,
int defaultChoice,
boolean multipleSelectionsAllowed)
prompt, ¼±ÅûçÇ×ÀÇ ¸®½ºÆ®, µðÆúÆ® ¼±Åà ¹× ¼±Åà ¸®½ºÆ®·Î º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇѰ¡ ¾î¶²°¡¸¦ ³ªÅ¸³»´Â ºÒ¸®¾ð °ªÀ» »ç¿ëÇØ, ChoiceCallback¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
| ¸Þ¼µå °³¿ä | |
|---|---|
boolean |
allowMultipleSelections ()
choices ¸®½ºÆ®·Î º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇѰ¡ ¾î¶²°¡¸¦ÀǹÌÇÏ´Â ºÒ¸®¾ð °ªÀ» ÃëµæÇÕ´Ï´Ù. |
String [] |
getChoices ()
¼±ÅûçÇ×ÀÇ ¸®½ºÆ®¸¦ ÃëµæÇÕ´Ï´Ù. |
int |
getDefaultChoice ()
defaultChoice¸¦ ÃëµæÇÕ´Ï´Ù. |
String |
getPrompt ()
prompt¸¦ ÃëµæÇÕ´Ï´Ù. |
int[] |
getSelectedIndexes ()
¼±ÅÃµÈ ¼±ÅûçÇ×À» ÃëµæÇÕ´Ï´Ù. |
void |
setSelectedIndex (int selection)
¼±ÅÃµÈ ¼±ÅûçÇ× (1°³)À» ¼³Á¤ÇÕ´Ï´Ù. |
void |
setSelectedIndexes (int[] selections)
¼±ÅÃµÈ ¼±ÅûçÇ× (º¹¼ö)À» ¼³Á¤ÇÕ´Ï´Ù. |
| Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| »ý¼ºÀÚ »ó¼¼ |
|---|
public ChoiceCallback(String prompt,
String [] choices,
int defaultChoice,
boolean multipleSelectionsAllowed)
ChoiceCallback¸¦ ±¸ÃàÇÕ´Ï´Ù.
prompt - ¼±ÅûçÇ×ÀÇ ¸®½ºÆ®ÀÇ ±â¼ú¿¡ »ç¿ëÇÏ´Â prompt choices - ¼±ÅûçÇ×ÀÇ ¸®½ºÆ® defaultChoice - ¼±ÅûçÇ×ÀÇ ¸®½ºÆ®°¡ Ç¥½ÃµÇ¾úÀ» ¶§¿¡ µðÆúÆ®ÀÇ ¼±ÅûçÇ×À¸·Î¼ »ç¿ëµÇ´Â ¼±ÅûçÇ×. ÀÌ °ªÀº choices ¹è¿ÀÇ À妽º·Î¼ ³ªÅ¸³»Áö´Â multipleSelectionsAllowed - ¼±ÅûçÇ×ÀÇ ¸®½ºÆ®·Î º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇѰ¡ ¾î¶²°¡¸¦ ÁöÁ¤ÇÏ´Â ºÒ¸®¾ð °ª
IllegalArgumentException - promptÀÌ nullÀÎ °æ¿ì, prompt
±æÀ̰¡ 0ÀÎ °æ¿ì, choices°¡ nullÀÎ °æ¿ì, choices
±æÀ̰¡ 0ÀÎ °æ¿ì, choices
¿ä¼Ò¿¡ nullÀÌ ÀÖ´Â °æ¿ì, choices
¿ä¼ÒÀÇ ¾î¶² °ÍÀΰ¡°¡ ±æÀÌ 0 ÀÎ °æ¿ì, ȤÀº defaultChoice°¡ choices
¹è¿ ¹üÀ§³»¿¡ ¾ø´Â °æ¿ì| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
public String getPrompt()
public String [] getChoices()
public int getDefaultChoice()
choices ¸®½ºÆ®ÀÇ À妽º·Î¼ ³ªÅ¸³»Áö´Â defaultChoicepublic boolean allowMultipleSelections()
choices ¸®½ºÆ®·Î º¹¼ö ¼±ÅÃÀÌ °¡´ÉÇѰ¡ ¾î¶²°¡¸¦ÀǹÌÇÏ´Â ºÒ¸®¾ð °ªÀ» ÃëµæÇÕ´Ï´Ù.
public void setSelectedIndex(int selection)
selection - choices ¸®½ºÆ®ÀÇ À妽º·Î¼ ³ªÅ¸³»Áö´Â ¼±Åà ³»¿ë (1°³)getSelectedIndexes() public void setSelectedIndexes(int[] selections)
selections - choices ¸®½ºÆ®ÀÇ À妽º·Î¼ ³ªÅ¸³»Áö´Â ¼±Åà ³»¿ë (º¹¼ö)
UnsupportedOperationException - º¹¼ö ¼±ÅÃÀ» ÇÒ ¼ö ¾ø´Â °æ¿ì. À̰ÍÀº allowMultipleSelections°ªÀ¸·Î ³ªÅ¸³»Áö´ÂgetSelectedIndexes() public int[] getSelectedIndexes()
choices ¸®½ºÆ®ÀÇ À妽º·Î¼ ³ªÅ¸³»Áö´ÂsetSelectedIndexes(int[])
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.