JavaTM 2 Platform
Standard Ed. 5.0

javax.swing.text
Ŭ·¡½º LabelView

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.swing.text.View 
      »óÀ§¸¦ È®Àå javax.swing.text.GlyphView 
          »óÀ§¸¦ È®Àå javax.swing.text.LabelView
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
Cloneable, SwingConstants, TabableView
¾Ë·ÁÁø Á÷°è ¼­ºê Ŭ·¡½º:
InlineView

public class LabelView
extends GlyphView
implements TabableView

LabelView´Â ÅؽºÆ® ¸ðµ¨ÀÇ ¿ä¼Ò»ó¿¡ ¸ÅÇÎ µÈ ºä¸¦ ³ªÅ¸³»´Â ÅؽºÆ®ÀÇ ¼­½Ä ÷ºÎ üũÀÔ´Ï´Ù. ·»´õ¸µ¿¡ »ç¿ëµÇ´Â ¹®ÀÚ ·¹º§ÀÇ ¼Ó¼ºÀ» ij½¬¿¡ Ãâ·ÂÇÕ´Ï´Ù.


Áßø(Nested) Ŭ·¡½º °³¿ä
 
Ŭ·¡½º javax.swing.text. GlyphView ·ÎºÎÅÍ »ó¼ÓµÈ Áßø(Nested) Ŭ·¡½º/ÀÎÅÍÆäÀ̽º
GlyphView.GlyphPainter
 
ÇÊµå °³¿ä
 
Ŭ·¡½º 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
 
»ý¼ºÀÚ °³¿ä
LabelView (Element  elem)
          ¿ä¼Ò¿¡ ·¦ µÈ »õ·Î¿î ºä¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 void changedUpdate (DocumentEvent  e, Shape  a, ViewFactory  f)
          ÀÌ ºä°¡ Ãë±ÞÇÏ´Â À§Ä¡¿¡¼­ ¼Ó¼ºÀÌ º¯°æµÈ °ÍÀ» ¹®¼­·ÎºÎÅÍ ÅëÁöÇÕ´Ï´Ù.
 Color getBackground ()
          ±×·¡ÇÁ ÀÇ ·»´õ¸µ¿¡ »ç¿ëÇÏ´Â ¹é±×¶ó¿îµå Ä÷¯¸¦ ²¨³À´Ï´Ù.
 Font getFont ()
          ±×·¡ÇÁ ÀÇ º£À̽º°¡ µÇ´Â ÆùÆ®¸¦ ²¨³À´Ï´Ù.
protected  FontMetrics getFontMetrics ()
          ÃßõÇÏÁö ¾Ê½À´Ï´Ù.  FontMetrics´Â Java2 SDK ·Î ½ÇÇàÇÏ´Â °æ¿ì´Â ±×·¡ÇÁ ·»´õ¸µ¿¡´Â »ç¿ëµÇÁö ¾Ê½À´Ï´Ù.
 Color getForeground ()
          ±×·¡ÇÁ ÀÇ ·»´õ¸µ¿¡ »ç¿ëÇÏ´Â foreground Ä÷¯¸¦ ²¨³À´Ï´Ù.
 boolean isStrikeThrough ()
          ±×·¡ÇÁ°¡ Ãë¼ÒÇØ ¼±À» °¡Áú±î È­µµÀÎÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
 boolean isSubscript ()
          ±×·¡ÇÁ¸¦ ½´ÆÛ ½ºÅ©¸³Æ®·Î¼­ ·»´õ¸µ ÇÒÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
 boolean isSuperscript ()
          ±×·¡ÇÁ¸¦ ÷Àڷμ­ ·»´õ¸µ ÇÒÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
 boolean isUnderline ()
          ±×·¡ÇÁ¿¡ ¹ØÁÙÀ» ºÙÀÏÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
protected  void setBackground (Color  bg)
          ºäÀÇ ¹é±×¶ó¿îµå Ä÷¯¸¦ ¼³Á¤ÇÕ´Ï´Ù.
protected  void setPropertiesFromAttributes ()
          Ä³½¬¿¡ Ãâ·ÂÇØÁø ÇÁ·ÎÆÛƼ¸¦ ¼Ó¼ºÀ¸·ÎºÎÅÍ ¼³Á¤ÇÕ´Ï´Ù.
protected  void setStrikeThrough (boolean s)
          ºä¿¡ Ãë¼ÒÇØ ¼±À» ºÙÀÏÁö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù.
protected  void setSubscript (boolean s)
          ºä°¡ ÷ÀÚ¸¦ ³ªÅ¸³¾Áö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù.
protected  void setSuperscript (boolean s)
          ºä°¡ ½´ÆÛ ½ºÅ©¸³Æ®¸¦ ³ªÅ¸³¾Áö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù.
protected  void setUnderline (boolean u)
          ºä¿¡ ¹ØÁÙÀ» ºÙÀÏÁö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù.
 
Ŭ·¡½º javax.swing.text. GlyphView ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
breakView, checkPainter, clone, createFragment, getAlignment, getBreakWeight, getEndOffset, getGlyphPainter, getNextVisualPositionFrom, getPartialSpan, getPreferredSpan, getStartOffset, getTabbedSpan, getTabExpander, getText, insertUpdate, modelToView, paint, removeUpdate, setGlyphPainter, viewToModel
 
Ŭ·¡½º javax.swing.text. View ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
append, forwardUpdate, forwardUpdateToView, getAttributes, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getMinimumSpan, getParent, getResizeWeight, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
ÀÎÅÍÆäÀ̽º javax.swing.text. TabableView ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
getPartialSpan, getTabbedSpan
 

»ý¼ºÀÚ »ó¼¼

LabelView

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

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

setUnderline

protected void setUnderline(boolean u)
ºä¿¡ ¹ØÁÙÀ» ºÙÀÏÁö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù. ÀÌ ¼³Á¤ ±â´É ¸Þ¼­µå´Â º¸È£µÇ°í ÀÖ¾î, ¼³Á¤½Ã¿¡ »óŸ¦ Ãß°¡ °»½ÅÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì¿¡¸¸ ±â´ÉÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
u - ºä¿¡ ¹ØÁÙÀÌ ºÙ¾î ÀÖ´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
isUnderline()

setStrikeThrough

protected void setStrikeThrough(boolean s)
ºä¿¡ Ãë¼ÒÇØ ¼±À» ºÙÀÏÁö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù. ÀÌ ¼³Á¤ ±â´É ¸Þ¼­µå´Â º¸È£µÇ°í ÀÖ¾î, ¼³Á¤½Ã¿¡ »óŸ¦ Ãß°¡ °»½ÅÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì¿¡¸¸ ±â´ÉÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
s - ºä¿¡ Ãë¼ÒÇØ ¼±ÀÌ ºÙ¾î ÀÖ´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
isStrikeThrough()

setSuperscript

protected void setSuperscript(boolean s)
ºä°¡ ½´ÆÛ ½ºÅ©¸³Æ®¸¦ ³ªÅ¸³¾Áö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù. ÀÌ ¼³Á¤ ±â´É ¸Þ¼­µå´Â º¸È£µÇ°í ÀÖ¾î, ¼³Á¤½Ã¿¡ »óŸ¦ Ãß°¡ °»½ÅÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì¿¡¸¸ ±â´ÉÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
s - ºä°¡ ½´ÆÛ ½ºÅ©¸³Æ®¸¦ ³ªÅ¸³»´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
isSuperscript()

setSubscript

protected void setSubscript(boolean s)
ºä°¡ ÷ÀÚ¸¦ ³ªÅ¸³¾Áö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù. ÀÌ ¼³Á¤ ±â´É ¸Þ¼­µå´Â º¸È£µÇ°í ÀÖ¾î, ¼³Á¤½Ã¿¡ »óŸ¦ Ãß°¡ °»½ÅÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì¿¡¸¸ ±â´ÉÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
s - ºä°¡ ÷ÀÚ¸¦ ³ªÅ¸³»´Â °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
isSubscript()

setBackground

protected void setBackground(Color  bg)
ºäÀÇ ¹é±×¶ó¿îµå Ä÷¯¸¦ ¼³Á¤ÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â º¸Åë, ÀÌ View ±¸¼ºÀÇ ÀÏȯÀ¸·Î¼­ È£ÃâÇÕ´Ï´Ù. ¹é±×¶ó¿îµå Ä÷¯¸¦ Ä¿½ºÅ͸¶ÀÌÁî ÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì´Â setPropertiesFromAttributes¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, ÀÌ ¸Þ¼­µå¸¦ È£ÃâÇÕ´Ï´Ù. °ª nullÀº ¹é±×¶ó¿îµå°¡ ·»´õ¸µ µÇÁö ¾Ê´Â °ÍÀ» ³ªÅ¸³»±â ¶§¹®¿¡ Ä£ View ¹é±×¶ó¿îµå°¡ ºñÃÄ º¸ÀÌ°Ô µË´Ï´Ù.

ÆĶó¹ÌÅÍ:
bg - ¹é±×¶ó¿îµå Ä÷¯, ¶Ç´Â null
µµÀÔµÈ ¹öÀü :
1.5
°ü·Ã Ç׸ñ:
setPropertiesFromAttributes()

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
ij½¬¿¡ Ãâ·ÂÇØÁø ÇÁ·ÎÆÛƼ¸¦ ¼Ó¼ºÀ¸·ÎºÎÅÍ ¼³Á¤ÇÕ´Ï´Ù.


getFontMetrics

@Deprecated 
protected FontMetrics  getFontMetrics()
ÃßõÇÏÁö ¾Ê½À´Ï´Ù.  FontMetrics´Â Java2 SDK ·Î ½ÇÇàÇÏ´Â °æ¿ì´Â ±×·¡ÇÁ ·»´õ¸µ¿¡´Â »ç¿ëµÇÁö ¾Ê½À´Ï´Ù.

ÀÌ ºä¿¡ »ç¿ëµÇ°í ÀÖ´Â FontMetrics¸¦ ²¨³À´Ï´Ù.


getBackground

public Color  getBackground()
±×·¡ÇÁ ÀÇ ·»´õ¸µ¿¡ »ç¿ëÇÏ´Â ¹é±×¶ó¿îµå Ä÷¯¸¦ ²¨³À´Ï´Ù. ÀÌ°ÍÀº ij½¬¿¡ Ãâ·ÂÇØÁø ¹é±×¶ó¿îµå Ä÷¯¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ±¸ÇöµÇ¾î µðÆúÆ®·Î nullÀÌ µË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ getBackground
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø ¹é±×¶ó¿îµå Ä÷¯

getForeground

public Color  getForeground()
±×·¡ÇÁ ÀÇ ·»´õ¸µ¿¡ »ç¿ëÇÏ´Â foreground Ä÷¯¸¦ ²¨³À´Ï´Ù. ÀÌ°ÍÀº ij½¬¿¡ Ãâ·ÂÇØÁø foreground Ä÷¯¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ±¸ÇöµÇ¾î µðÆúÆ®·Î nullÀÌ µË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ getForeground
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø foreground Ä÷¯

getFont

public Font  getFont()
±×·¡ÇÁ ÀÇ º£À̽º°¡ µÇ´Â ÆùÆ®¸¦ ²¨³À´Ï´Ù. ij½¬¿¡ Ãâ·ÂÇØÁø ÆùÆ®¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ±¸ÇöµË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ getFont
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø ÆùÆ®

isUnderline

public boolean isUnderline()
±×·¡ÇÁ¿¡ ¹ØÁÙÀ» ºÙÀÏÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. trueÀÎ °æ¿ì, baseline¿¡ ¹ØÁÙÀÌ ²ø¸³´Ï´Ù. ÀÌ°ÍÀº ij½¬¿¡ Ãâ·ÂÇØÁø ¹ØÁÙÀÇ ÇÁ·ÎÆÛƼ¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ±¸ÇöµË´Ï´Ù.

ÀÌ ÇÁ·ÎÆÛƼ¸¦ ¿ä±¸ÇÒ ¶§, Element AttributeSet ¶ó°í ÇÏ´Â ÇÁ·ÎÆÛƼ·ÎLabelView »óÅ°¡ µ¿±â ´Ù½Ã ÇÕ´Ï´Ù. Element AttributeSet¿¡ ÀÌ ÇÁ·ÎÆÛƼ ¼¼Æ®°¡ ¾ø´Â °æ¿ì, false¿¡ µÇµ¹·ÁÁý´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ isUnderline
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø underline ÇÁ·ÎÆÛƼÀÇ °ª

isStrikeThrough

public boolean isStrikeThrough()
±×·¡ÇÁ°¡ Ãë¼ÒÇØ ¼±À» °¡Áú±î È­µµÀÎÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. trueÀÎ °æ¿ì, ±×·¡ÇÁ ÀÇ Áß¾Ó¿¡ ¼±ÀÌ ²ø¸³´Ï´Ù. ÀÌ°ÍÀº ij½¬¿¡ Ãâ·ÂÇØÁø strikeThrough ÇÁ·ÎÆÛƼ¸¦ µ¹·ÁÁÖ±â À§Çؼ­ ±¸ÇöµË´Ï´Ù.

ÀÌ ÇÁ·ÎÆÛƼ¸¦ ¿ä±¸ÇÒ ¶§, Element AttributeSet ¶ó°í ÇÏ´Â ÇÁ·ÎÆÛƼ·ÎLabelView »óÅ°¡ µ¿±â ´Ù½Ã ÇÕ´Ï´Ù. Element AttributeSet¿¡ ÀÌ ÇÁ·ÎÆÛƼ ¼¼Æ®°¡ ¾ø´Â °æ¿ì, false¿¡ µÇµ¹·ÁÁý´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ isStrikeThrough
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø strikeThrough ÇÁ·ÎÆÛƼÀÇ °ª

isSubscript

public boolean isSubscript()
±×·¡ÇÁ¸¦ ½´ÆÛ ½ºÅ©¸³Æ®·Î¼­ ·»´õ¸µ ÇÒÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ isSubscript
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø ÷ÀÚ ÇÁ·ÎÆÛƼÀÇ °ª

ÀÌ ÇÁ·ÎÆÛƼ¸¦ ¿ä±¸ÇÒ ¶§, Element AttributeSet ¶ó°í ÇÏ´Â ÇÁ·ÎÆÛƼ·ÎLabelView »óÅ°¡ µ¿±â ´Ù½Ã ÇÕ´Ï´Ù. Element AttributeSet¿¡ ÀÌ ÇÁ·ÎÆÛƼ ¼¼Æ®°¡ ¾ø´Â °æ¿ì, false¿¡ µÇµ¹·ÁÁý´Ï´Ù.


isSuperscript

public boolean isSuperscript()
±×·¡ÇÁ¸¦ ÷Àڷμ­ ·»´õ¸µ ÇÒÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.

ÀÌ ÇÁ·ÎÆÛƼ¸¦ ¿ä±¸ÇÒ ¶§, Element AttributeSet ¶ó°í ÇÏ´Â ÇÁ·ÎÆÛƼ·ÎLabelView »óÅ°¡ µ¿±â ´Ù½Ã ÇÕ´Ï´Ù. Element AttributeSet¿¡ ÀÌ ÇÁ·ÎÆÛƼ ¼¼Æ®°¡ ¾ø´Â °æ¿ì, false¿¡ µÇµ¹·ÁÁý´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ isSuperscript
¹Ýȯ°ª:
ij½¬¿¡ Ãâ·ÂÇØÁø superscript ÇÁ·ÎÆÛƼÀÇ °ª

changedUpdate

public void changedUpdate(DocumentEvent  e,
                          Shape  a,
                          ViewFactory  f)
ÀÌ ºä°¡ Ãë±ÞÇÏ´Â À§Ä¡¿¡¼­ ¼Ó¼ºÀÌ º¯°æµÈ °ÍÀ» ¹®¼­·ÎºÎÅÍ ÅëÁöÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º GlyphView ³»ÀÇ changedUpdate
ÆĶó¹ÌÅÍ:
e - °ü·ÃµÈ ¹®¼­·ÎºÎÅÍÀÇ º¯°æ Á¤º¸
a - ºäÀÇ ÇöÀçÀÇ ÇÒ´ç
f - ºä°¡ ÀÚ½ÄÀ» °¡Áö´Â °æ¿ì¿¡ À籸Ãà¿¡ »ç¿ëÇÏ´Â ÆÑÅ丮
°ü·Ã Ç׸ñ:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

JavaTM 2 Platform
Standard Ed. 5.0

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