JavaTM 2
Platform
Std.  Ed.  v1. 4.0

javax.swing.text
Ŭ·¡½º FlowView.FlowStrategy

java.lang.Object 
  |
  +--javax.swing.text.FlowView.FlowStrategy
Æ÷ÇԵǾî Àִ Ŭ·¡½º:
FlowView

public static class FlowView.FlowStrategy
extends Object

Ç÷οì(flow)ÀÇ ¹°¸®ÀûÀÎ ÆûÀ» À¯ÁöÇϱâ À§ÇÑ ¹æ¹ýÀÔ´Ï´Ù. µðÆúÆ®ÀÇ ±¸Çö¿¡´Â »óŰ¡ ÀüÇô ¾ø°í, ·¹À̾ƿôÀÌ ÁöÁ¤µÈ FlowView Áß(¾È)¿¡¼­ ¹«È¿ÀÎ °æ¿ì´Â ÀüÇ÷οì(flow)¸¦ Àç°è»êÇÕ´Ï´Ù. Çϳª ´õÀÇ ¹æ¹ýÀº ¼­ºê Ŭ·¡½º¿¡¼­ ±¸ÇöÇØ, ·¹À̾ƿôÀ» Ãß°¡ ¼öº¹Çϵ簡 ¶Ç´Â ´ëüÀÇ ºê·¹ÀÌÅ© µ¿ÀÛÀ» ½ÇÇàÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù.


»ý¼ºÀÚÀÇ °³¿ä
FlowView.FlowStrategy ()
           
 
¸Þ¼ÒµåÀÇ °³¿ä
protected  void adjustRow (FlowView  fv, int rowIndex, int desiredSpan, int x)
          ÁöÁ¤µÈ ÇàÀ» °¡´ÉÇϸé Á¶Á¤ÇØ, ¹èÄ¡ ½ºÆÒ³»¿¡ ³Öµµ·Ï(µíÀÌ) ÇÕ´Ï´Ù.
 void changedUpdate (FlowView  fv, DocumentEvent  e, Rectangle  alloc)
          ÀÌ ºä°¡ Ãë±ÞÇÏ´Â À§Ä¡¿¡¼­ ¼Ó¼ºÀÌ º¯°æµÈ °ÍÀ» ¹®¼­·ÎºÎÅÍ ÅëÁöÇÕ´Ï´Ù.
protected  View createView (FlowView  fv, int startOffset, int spanLeft, int rowIndex)
          ÇöÀçÀÇ Ç÷οì(flow)ÀÇ ÀϺθ¦ ³ªÅ¸³»±â À§Çؼ­(¶§¹®¿¡) »ç¿ëÇÒ ¼ö ÀÖ´Â ºä¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
protected  View getLogicalView (FlowView  fv)
          ÀÌ ¸Þ¼Òµå´Â FlowView ÀÇ ³í¸® ºä¿¡ÀÇ Ç÷οì(flow)¸¦ ³ªÅ¸³À´Ï´Ù.
 void insertUpdate (FlowView  fv, DocumentEvent  e, Rectangle  alloc)
          ÀÌ ºä°¡ ´ã´çÇÏ´Â À§Ä¡¿¡¼­ ¹®¼­¿¡ ¹«¾ùÀΰ¡°¡ »ðÀÔµÈ °ÍÀ» ÅëÁöÇÕ´Ï´Ù.
 void layout (FlowView  fv)
          ÁöÁ¤µÈ FlowView ÀÇ Ç÷οì(flow)¸¦ °»½ÅÇÕ´Ï´Ù.
protected  int layoutRow (FlowView  fv, int rowIndex, int pos)
          ÇàÀÇ ¹èÄ¡ ½ºÆÒ ¼Ó¿¡ ¾ÈÁ¤µÇ´Â ºäÀÇ ÇàÀ» ÀÛ¼ºÇÕ´Ï´Ù.
 void removeUpdate (FlowView  fv, DocumentEvent  e, Rectangle  alloc)
          ÀÌ ºä°¡ ´ã´çÇÏ´Â ¹®¼­³»ÀÇ À§Ä¡·ÎºÎÅÍ ¹«¾ùÀΰ¡°¡ »èÁ¦µÇ¾ú´Ù°í ÇÏ´Â °ÍÀ» ÅëÁöÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Object ¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼Òµå
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

»ý¼ºÀÚÀÇ »ó¼¼

FlowView.FlowStrategy

public FlowView.FlowStrategy()
¸Þ¼ÒµåÀÇ »ó¼¼

insertUpdate

public void insertUpdate(FlowView  fv,
                         DocumentEvent  e,
                         Rectangle  alloc)
ÀÌ ºä°¡ ´ã´çÇÏ´Â À§Ä¡¿¡¼­ ¹®¼­¿¡ ¹«¾ùÀΰ¡°¡ »ðÀÔµÈ °ÍÀ» ÅëÁöÇÕ´Ï´Ù. ÀÌ ¸Þ¼Òµå¿¡¼­´Â ¼öº¹ÇÒ ¶§¿¡ »ç¿ëÇÏ´Â ÀûÀýÇÑ º¯°æ area¸¦ °»½ÅÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
e - °ü·ÃÇÏ´Â ¹®¼­·ÎºÎÅÍÀÇ º¯°æ Á¤º¸
alloc - ÀÎ ¼¼Æ®ÀÇ ¾ÈÂÊÀÇ ºäÀÇ ÇöÀçÀÇ ÇÒ´ç. ºä°¡ Ç¥½ÃµÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì, ¹Ýȯ°ªÀº null
°ü·Ã Ç׸ñ:
View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

removeUpdate

public void removeUpdate(FlowView  fv,
                         DocumentEvent  e,
                         Rectangle  alloc)
ÀÌ ºä°¡ ´ã´çÇÏ´Â ¹®¼­³»ÀÇ À§Ä¡·ÎºÎÅÍ ¹«¾ùÀΰ¡°¡ »èÁ¦µÇ¾ú´Ù°í ÇÏ´Â °ÍÀ» ÅëÁöÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
e - °ü·ÃÇÏ´Â ¹®¼­·ÎºÎÅÍÀÇ º¯°æ Á¤º¸
alloc - ÀÎ ¼¼Æ®ÀÇ ¾ÈÂÊÀÇ ºäÀÇ ÇöÀçÀÇ ÇÒ´ç
°ü·Ã Ç׸ñ:
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

changedUpdate

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

°ü·Ã Ç׸ñ:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

getLogicalView

protected View  getLogicalView(FlowView  fv)
ÀÌ ¸Þ¼Òµå´Â FlowView ÀÇ ³í¸® ºä¿¡ÀÇ Ç÷οì(flow)¸¦ ³ªÅ¸³À´Ï´Ù.


layout

public void layout(FlowView  fv)
ÁöÁ¤µÈ FlowView ÀÇ Ç÷οì(flow)¸¦ °»½ÅÇÕ´Ï´Ù. µðÆúÆ®¿¡¼­´Â ¸ðµç ¾ÆÀÌ ºäÀÇ ÇàÀÌ °¢ ÇàÀÇ Á¦¾à¿¡ ÇÕÄ¡Çϵµ·Ï(µíÀÌ) À籸Ãà µË´Ï´Ù. À̰ÍÀº FlowView.layout °¡ È£ÃâÇØ Ç÷οì(flow) ¼ÓÀÇ ¾ÆÀÌ ºä¸¦ °»½ÅÇÕ´Ï´Ù.


layoutRow

protected int layoutRow(FlowView  fv,
                        int rowIndex,
                        int pos)
ÇàÀÇ ¹èÄ¡ ½ºÆÒ ¼Ó¿¡ ¾ÈÁ¤µÇ´Â ºäÀÇ ÇàÀ» ÀÛ¼ºÇÕ´Ï´Ù. ¹èÄ¡ ¸Þ¼Òµå°¡ È£ÃâÇÕ´Ï´Ù. ÀÌ ±¸ÇöÀº »ç¿ë °¡´ÉÇÑ ½ºÆÒÀÌ ºñ¿ï ¶§±îÁö °­Á¦ ºê·¹ÀÌÅ©°¡ °ËÃâµÉ ¶§±îÁö ¶Ç´Â createView ¸Þ¼Òµå°¡ null ¸¦ µ¹·ÁÁÙ ¶§±îÁö ¹Ýº¹ÇØ È£ÃâÇØ Çà¿¡ »ðÀÔÇÕ´Ï´Ù. ³ª¸ÓÁöÀÇ ½ºÆÒÀÌ ºñ¿ì¸é, adjustRow ¸Þ¼Òµå°¡ ºÒ·Á °¡°í ÁöÁ¤ÇÑ ½ºÆÒ¿¡ ¾ÈÁ¤µÇµµ·Ï(µíÀÌ) ÇàÀ» Á¶Á¤ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
rowIndex - ºä¸¦ °ÅµÎ´Â ÇàÀÇ À妽º. ÇàÀº ÀÔ±¸¿¡¼­´Â ÇÏ´Ã
pos - ÀÌ ¾ÆÀÌ ºä ¿ä¼Ò ¼ÓÀÇ ÇöÀçÀÇ °³½Ã À§Ä¡
¹Ýȯ°ª:
´ÙÀ½ÀÇ ÇàÀ» °³½ÃÇÏ´Â À§Ä¡

adjustRow

protected void adjustRow(FlowView  fv,
                         int rowIndex,
                         int desiredSpan,
                         int x)
ÁöÁ¤µÈ ÇàÀ» °¡´ÉÇϸé Á¶Á¤ÇØ, ¹èÄ¡ ½ºÆÒ³»¿¡ ³Öµµ·Ï(µíÀÌ) ÇÕ´Ï´Ù. µðÆúÆ®¿¡¼­´Â ÁÙ ³¡²¿¸®·Î ÇÒ ¼ö ÀÖÀ» »Ó(¸¸Å­) ±Ùó¿¡¼­ ÃÖ´ëÀÇ ºÐÇÒ ¿þÀÌÆ®¸¦ ã¾Æ³»·Á°í ÇÕ´Ï´Ù. °­Á¦ ºÐÇÒÀÌ °ËÃâµÇ¸é(ÀÚ), ºÐÇÒÀÌ °Å±â¿¡ ¹èÄ¡µË´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
desiredSpan - ÇöÀçÀÇ ¹èÄ¡ ½ºÆÒ >= 0
x - r ÀÇ °³½Ã À§Ä¡

createView

protected View  createView(FlowView  fv,
                          int startOffset,
                          int spanLeft,
                          int rowIndex)
ÇöÀçÀÇ Ç÷οì(flow)ÀÇ ÀϺθ¦ ³ªÅ¸³»±â À§Çؼ­(¶§¹®¿¡) »ç¿ëÇÒ ¼ö ÀÖ´Â ºä¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ³í¸® ºäÀÇ Àüü ºä¿¡¼­µµ, ÀϺο¡¼­µµ ±¦Âú½À´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
fv - Ç÷οì(flow)¸¦ º¸°ü À¯ÁöÇÏ´Â ºä
startOffset - ÀÛ¼ºµÇ´Â ºäÀÇ °³½Ã À§Ä¡
spanLeft - Çà¿¡ »ðÀԵǴ ³ª¸ÓÁöÀÇ ½ºÆÒ
rowIndex - ºäÀÇ ¹èġóÀÇ Çà

JavaTM 2
Platform
Std.  Ed.  v1. 4.0

¹ö±×ÀÇ º¸°í¿Í ±â´ÉÀÇ ¸®Äù½ºÆ®
ÀÌ¿ÜÀÇ API ·¹ÆÛ·±½º ¹× °³¹ßÀÚ¿ë ¹®¼­¿¡ ´ëÇØ¼­´Â Java 2 SDK SE °³¹ßÀÚ¿ë ¹®¼­¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä. °³¹ßÀÚÀü¿ëÀÇ »ó¼¼ÇÑ ÇØ¼³, °³³äÀÇ °³¿ä, ¿ë¾îÀÇ Á¤ÀÇ, ¹ö±×ÀÇ È¸ÇÇÃ¥, ¹× ÄÚµå ½Ç·Ê°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.

Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ À־ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.