JavaTM 2 Platform
Standard Ed. 5.0

javax.swing.text
Ŭ·¡½º PasswordView

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.swing.text.View 
      »óÀ§¸¦ È®Àå javax.swing.text.PlainView 
          »óÀ§¸¦ È®Àå javax.swing.text.FieldView 
              »óÀ§¸¦ È®Àå javax.swing.text.PasswordView
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
SwingConstants, TabExpander

public class PasswordView
extends FieldView

JPasswordField UI ±¸ÇöÀ¸·Î »ç¿ëÇϴµ¥ ÀûÇÕÇÑ View¸¦ ±¸ÇöÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î °ü·ÃµÈ ÄÄÆÛ³ÍÆ®·Î ÁöÁ¤µÈ ¸Þ¾Æ¸® ¹®ÀÚ·Î ±× ³»¿ëÀ» ·»´õ¸µ ÇÏ´Â UI ÇʵåÀÔ´Ï´Ù (ÄÄÆÛ³ÍÆ®¸¦ JPasswordField ·Î ÇÑÁ¤ÇÒ ¼ö ÀÖ´Â °æ¿ì).

°ü·Ã Ç׸ñ:
View

ÇÊµå °³¿ä
 
Ŭ·¡½º javax.swing.text. PlainView ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå
metrics
 
Ŭ·¡½º javax.swing.text. View ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
 
ÀÎÅÍÆäÀ̽º javax.swing. SwingConstants ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
»ý¼ºÀÚ °³¿ä
PasswordView (Element  elem)
          ¿ä¼Ò¿¡ ·¦ µÈ »õ·Î¿î ºä¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
protected  int drawEchoCharacter (Graphics  g, int x, int y, char c)
          ¸Þ¾Æ¸® ¹®ÀÚ¸¦ ·»´õ¸µ ÇÏ´ÂÁö, Æнº¿öµå ij¸¯ÅÍ ¶óÀÎÀ» Ç¥½ÃÇϴµ¥ »ç¿ëÇÏ´Â ÀÓÀÇÀÇ ±×·¡ÇÈÀ» ·»´õ¸µ ÇÕ´Ï´Ù.
protected  int drawSelectedText (Graphics  g, int x, int y, int p0, int p1)
          ¸ðµ¨³»ÀÇ ÁöÁ¤µÈ ¹üÀ§¸¦, ¼±ÅÃÇÑ ÅؽºÆ®·Î¼­ ·»´õ¸µ ÇÕ´Ï´Ù.
protected  int drawUnselectedText (Graphics  g, int x, int y, int p0, int p1)
          ¸ðµ¨³»ÀÇ ÁöÁ¤µÈ ¹üÀ§¸¦, ¼±Åà ÇØÁ¦ÇÑ º¸Åë ÀÇ ÅؽºÆ®·Î¼­ ·»´õ¸µ ÇÕ´Ï´Ù.
 float getPreferredSpan (int axis)
          ÀÌ ºä¿¡ ÀûÀýÇÑ ½ºÆÒÀ» ÃàÀ¸·Î µû¶ó ÁöÁ¤ÇÕ´Ï´Ù.
 Shape modelToView (int pos, Shape  a, Position.Bias  b)
          ¹®¼­ ¸ðµ¨ÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ºäÀÇ ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù.
 int viewToModel (float fx, float fy, Shape  a, Position.Bias [] bias)
          ºäÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ¸ðµ¨ÀÇ ³í¸® ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù.
 
Ŭ·¡½º javax.swing.text. FieldView ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
adjustAllocation, getFontMetrics, getResizeWeight, insertUpdate, paint, removeUpdate
 
Ŭ·¡½º javax.swing.text. PlainView ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
changedUpdate, damageLineRange, drawLine, getLineBuffer, getTabSize, lineToRect, nextTabStop, setSize, updateDamage, updateMetrics
 
Ŭ·¡½º javax.swing.text. View ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
append, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, updateChildren, updateLayout, viewToModel
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

PasswordView

public PasswordView(Element  elem)
¿ä¼Ò¿¡ ·¦ µÈ »õ·Î¿î ºä¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
elem - ¿ä¼Ò
¸Þ¼­µåÀÇ »ó¼¼

drawUnselectedText

protected int drawUnselectedText(Graphics  g,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
                          throws BadLocationException 
¸ðµ¨³»ÀÇ ÁöÁ¤µÈ ¹üÀ§¸¦, ¼±Åà ÇØÁ¦ÇÑ º¸Åë ÀÇ ÅؽºÆ®·Î¼­ ·»´õ¸µ ÇÕ´Ï´Ù. foreground Ä÷¯¸¦ ¼³Á¤ÇØ, getEchoChar()°¡ µ¹·ÁÁÖ´Â °ªÀ» »ç¿ëÇØ ¹®ÀÚ¸¦ ¸Þ¾Æ¸® Ç¥½ÃÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º PlainView ³»ÀÇ drawUnselectedText
ÆĶó¹ÌÅÍ:
g - ±×·¡ÇÈ ÄÁÅؽºÆ®
x - °³½Ã X ÁÂÇ¥ >= 0
y - °³½Ã Y ÁÂÇ¥ >= 0
p0 - ¸ðµ¨³»ÀÇ °³½Ã ¿ÀÇÁ¼Â(offset) >= 0
p1 - ¸ðµ¨³»ÀÇ Á¾·á ¿ÀÇÁ¼Â(offset) >= p0
¹Ýȯ°ª:
¹üÀ§ÀÇ Á¾·áÀÇ X À§Ä¡ >= 0
¿¹¿Ü:
BadLocationException - p0 ¶Ç´Â p1°¡ ¹üÀ§¿ÜÀÇ °æ¿ì

drawSelectedText

protected int drawSelectedText(Graphics  g,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws BadLocationException 
¸ðµ¨³»ÀÇ ÁöÁ¤µÈ ¹üÀ§¸¦, ¼±ÅÃÇÑ ÅؽºÆ®·Î¼­ ·»´õ¸µ ÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå¸¦ ±¸ÇöÇϸé, ¼ö¿ëÃø ÄÄÆÛ³ÍÆ®·Î ÁöÁ¤µÈ »öÀÇ ÅؽºÆ®¸¦ ·»´õ¸µ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº ÇÏÀÌ ¶óÀÌÅÍ°¡ ¼±ÅÃÇÑ ¹é±×¶ó¿îµå¸¦ ·»´õ¸µ ÇÏ´Â °Í°ú »óÁ¤ÇÕ´Ï´Ù. getEchoChar()ÀÇ °á°ú¸¦ »ç¿ëÇØ, ij¸¯ÅÍ ¶óÀÎÀ» Ç¥½ÃÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º PlainView ³»ÀÇ drawSelectedText
ÆĶó¹ÌÅÍ:
g - ±×·¡ÇÈ ÄÁÅؽºÆ®
x - °³½Ã X ÁÂÇ¥ >= 0
y - °³½Ã Y ÁÂÇ¥ >= 0
p0 - ¸ðµ¨³»ÀÇ °³½Ã ¿ÀÇÁ¼Â(offset) >= 0
p1 - ¸ðµ¨³»ÀÇ Á¾·á ¿ÀÇÁ¼Â(offset) >= p0
¹Ýȯ°ª:
¹üÀ§ÀÇ Á¾·áÀÇ X À§Ä¡ >= 0
¿¹¿Ü:
BadLocationException - p0 ¶Ç´Â p1°¡ ¹üÀ§¿ÜÀÇ °æ¿ì

drawEchoCharacter

protected int drawEchoCharacter(Graphics  g,
                                int x,
                                int y,
                                char c)
¸Þ¾Æ¸® ¹®ÀÚ¸¦ ·»´õ¸µ ÇÏ´ÂÁö, Æнº¿öµå ij¸¯ÅÍ ¶óÀÎÀ» Ç¥½ÃÇϴµ¥ »ç¿ëÇÏ´Â ÀÓÀÇÀÇ ±×·¡ÇÈÀ» ·»´õ¸µ ÇÕ´Ï´Ù. Graphics °´Ã¼³»ÀÇ »öÀº ¼±ÅÃÇÑ ÅؽºÆ® ¶Ç´Â ¼±Åà ÇØÁ¦ÇÑ ÅؽºÆ®¿¡ ÀûÀýÇÑ foreground Ä÷¯·Î ¼³Á¤µË´Ï´Ù.

ÆĶó¹ÌÅÍ:
g - ±×·¡ÇÈ ÄÁÅؽºÆ®
x - °³½Ã X ÁÂÇ¥ >= 0
y - °³½Ã Y ÁÂÇ¥ >= 0
c - ¸Þ¾Æ¸® ¹®ÀÚ
¹Ýȯ°ª:
°»½ÅµÈ X À§Ä¡ >= 0

modelToView

public Shape  modelToView(int pos,
                         Shape  a,
                         Position.Bias  b)
                  throws BadLocationException 
¹®¼­ ¸ðµ¨ÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ºäÀÇ ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º FieldView ³»ÀÇ modelToView
ÆĶó¹ÌÅÍ:
pos - º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0
a - ·»´õ¸µ¸¦ À§Çؼ­ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ª
b - À§°ªÀÌ 2°³ÀÇ ºäÀÇ °æ°èÀÎ °æ¿ì¿¡ ¿ÀÇÁ¼Â(offset)¿¡ ÀÇÇØ ³ªÅ¸³»Áö±â Á÷ÀüÀÇ ¹®ÀÚ ¶Ç´Â ´ÙÀ½ÀÇ ¹®ÀÚ¿¡ÀÇ ¹ÙÀ̾. b°ªÀº ´ÙÀ½ÀÇ ¾î¶² °ÍÀΰ¡°¡ µÈ´Ù
  • Position.Bias.Forward
  • Position.Bias.Backward
¹Ýȯ°ª:
ÁöÁ¤µÈ À§Ä¡ÀÇ ¹Ù¿îµù¹Ú½º
¿¹¿Ü:
BadLocationException - ÁöÁ¤µÈ À§°ªÀÌ °ü·ÃµÈ ¹®¼­³»ÀÇ À¯È¿ÇÑ À§Ä¡¸¦ ³ªÅ¸³»Áö ¾Ê´Â °æ¿ì
°ü·Ã Ç׸ñ:
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)

viewToModel

public int viewToModel(float fx,
                       float fy,
                       Shape  a,
                       Position.Bias [] bias)
ºäÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ¸ðµ¨ÀÇ ³í¸® ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º FieldView ³»ÀÇ viewToModel
ÆĶó¹ÌÅÍ:
fx - X ÁÂÇ¥ >= 0.0f
fy - Y ÁÂÇ¥ >= 0.0f
a - ·»´õ¸µ¸¦ À§Çؼ­ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ª
¹Ýȯ°ª:
ÁöÁ¤µÈ ºä³»ÀÇ Á¡À» °¡Àå ÀûÀýÈ÷ Ç¥ÇöÇÏ´Â ¸ðµ¨³»ÀÇ À§Ä¡
°ü·Ã Ç׸ñ:
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])

getPreferredSpan

public float getPreferredSpan(int axis)
ÀÌ ºä¿¡ ÀûÀýÇÑ ½ºÆÒÀ» ÃàÀ¸·Î µû¶ó ÁöÁ¤ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º FieldView ³»ÀÇ getPreferredSpan
ÆĶó¹ÌÅÍ:
axis - View.X_AXIS ¶Ç´Â View.Y_AXIS
¹Ýȯ°ª:
ºäÀÇ ·»´õ¸µ ´ë»óÀÇ ½ºÆÒ >= 0. º¸Åë, ºä´Â ¸®ÅÏµÈ ½ºÆÒ³»¿¡ ·»´õ¸µ µÇ°Ô µÇÁö¸¸, º¸ÁõÀº ¾ø´Ù. ºÎ¸ð´Â ºäÀÇ »çÀÌÁî º¯°æÀ̳ª ºÐÇÒÀ» ½Ç½ÃÇÒ °¡´É¼ºÀÌ ÀÖ´Â
°ü·Ã Ç׸ñ:
View.getPreferredSpan(int)

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.