JavaTM 2
Platform
Std.  Ed.  v1. 4.0

javax.swing.undo
ÀÎÅÍÆäÀ̽º UndoableEdit

±âÁ¸ÀÇ ±¸Çö Ŭ·¡½ºÀÇ À϶÷:
AbstractUndoableEdit

public interface UndoableEdit

½ÇÇàµÈ ÆíÁý °á°ú¸¦ ³ªÅ¸³»´Â ¿ÀºêÁ§Æ®·Î, ¹ÙÅÁÀ¸·Î µÇµ¹¸®°Å³ª Àç½ÇÇàÇϰųª ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù.


¸Þ¼ÒµåÀÇ °³¿ä
 boolean addEdit (UndoableEdit  anEdit)
          UndoableEdit ´Â °¡´ÉÇÑ °æ¿ì´Â anEdit ¸¦ ¼öÁß¿¡ ³Ö½À´Ï´Ù.
 boolean canRedo ()
          ÀÌ Á¶ÀÛÀ» ¾ÆÁ÷ Àç½ÇÇàÇÒ ¼ö ÀÖ´Â °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 boolean canUndo ()
          ÀÌ Á¶ÀÛÀ» ¾ÆÁ÷ ¹ÙÅÁÀ¸·Î µÇµ¹¸± ¼ö ÀÖ´Â °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 void die ()
          ÆíÁý °á°ú¿¡, ´õ ÀÌ»ó »ç¿ëÇÒ ¼ö ¾ø´Â °ÍÀ» ÅëÁöÇϱâ À§Çؼ­ º¸³»Áý´Ï´Ù.
 String getPresentationName ()
          º¯°æ ·Î±×µîÀ¸·Î »ç¿ëµÇ´Â ÀÌ ÆíÁý °á°úÀÇ, ÆÇµ¶ °¡´ÉÇÑ Áö¿ª¿¡ ´ëÀÀÇÑ ±â¼úÀ» Á¦°øÇÕ´Ï´Ù.
 String getRedoPresentationName ()
          [Àç½ÇÇà (Redo)] ¸Þ´º Ç׸ñµîÀ¸·Î »ç¿ëµÇ´Â ÀÌ ÆíÁý °á°úÀÇ, Àç½ÇÇàÇÒ ¼ö ÀÖ´Â Çü½ÄÀÇ ÆÇµ¶ °¡´ÉÇÑ Áö¿ª¿¡ ´ëÀÀÇÑ ±â¼úÀ» Á¦°øÇÕ´Ï´Ù.
 String getUndoPresentationName ()
          [¹ÙÅÁÀ¸·Î µÇµ¹¸®´Â (Undo)] ¸Þ´º Ç׸ñµîÀ¸·Î »ç¿ëµÇ´Â ÀÌ ÆíÁý °á°úÀÇ, ¹ÙÅÁÀ¸·Î µÇµ¹¸± ¼ö ÀÖ´Â Çü½ÄÀÇ ÆÇµ¶ °¡´ÉÇÑ Áö¿ª¿¡ ´ëÀÀÇÑ ±â¼úÀ» Á¦°øÇÕ´Ï´Ù.
 boolean isSignificant ()
          ÀÌ ÆíÁý °á°ú¿¡ Àǹ̰¡ ¾ø´Â °æ¿ì, ¿¹¸¦ µé¾î À¯ÀúÀÇ ¼±ÅÃÀº À¯ÁöµÇÁö¸¸ ¾î´À ¸ðµ¨ »óŵµ º¯°æµÇÁö ¾Ê´Â °æ¿ì¿¡, false ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 void redo ()
          ÆíÁý °á°ú°¡ ¹ÙÅÁÀ¸·Î µÇµ¹·ÁÁö°í ÀÖ´Â °æ¿ì¿¡, ÆíÁý °á°ú¸¦ ´Ù½Ã Àû¿ëÇÕ´Ï´Ù.
 boolean replaceEdit (UndoableEdit  anEdit)
          ÀÌ UndoableEdit ¿¡ ÀÇÇØ anEdit °¡ ġȯµÇ´Â °æ¿ì´Â true ¸¦ µ¹·ÁÁÝ´Ï´Ù.
 void undo ()
          ½ÇÇàµÈ ÆíÁý °á°ú¸¦ ¹ÙÅÁÀ¸·Î µÇµ¹¸³´Ï´Ù.
 

¸Þ¼ÒµåÀÇ »ó¼¼

undo

public void undo()
          throws CannotUndoException 
½ÇÇàµÈ ÆíÁý °á°ú¸¦ ¹ÙÅÁÀ¸·Î µÇµ¹¸³´Ï´Ù.

CannotUndoException

canUndo

public boolean canUndo()
ÀÌ Á¶ÀÛÀ» ¾ÆÁ÷ ¹ÙÅÁÀ¸·Î µÇµ¹¸± ¼ö ÀÖ´Â °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù.


redo

public void redo()
          throws CannotRedoException 
ÆíÁý °á°ú°¡ ¹ÙÅÁÀ¸·Î µÇµ¹·ÁÁö°í ÀÖ´Â °æ¿ì¿¡, ÆíÁý °á°ú¸¦ ´Ù½Ã Àû¿ëÇÕ´Ï´Ù.

CannotRedoException

canRedo

public boolean canRedo()
ÀÌ Á¶ÀÛÀ» ¾ÆÁ÷ Àç½ÇÇàÇÒ ¼ö ÀÖ´Â °æ¿ì¿¡ true ¸¦ µ¹·ÁÁÝ´Ï´Ù.


die

public void die()
ÆíÁý °á°ú¿¡, ´õ ÀÌ»ó »ç¿ëÇÒ ¼ö ¾ø´Â °ÍÀ» ÅëÁöÇϱâ À§Çؼ­ º¸³»Áý´Ï´Ù. À̰ÍÀº ¹ÙÅÁÀ¸·Î µÇµ¹¸®´Â Á¶ÀÛÀ̳ª Àç½ÇÇàÀÇ Á¶ÀÛÀÌ ºÒ°¡´ÉÇÏ°Ô µÇ¾î, ºÒÇÊ¿äÇÏ°Ô µÈ »óŸ¦ Ŭ¸° ¾÷ ÇÒ ¶§, ¿¹¸¦ µé¾î, »èÁ¦ÀÇ Ãë¼Ò¸¦ ÇÒ ¼ö ¾ø°Ô µÈ ¿ÀºêÁ§Æ®¿¡ ÀÇÇØ »ç¿ëµÇ´Â ÆÄÀÏ ¸®¼Ò½º¸¦ »èÁ¦ÇÏ´Â °æ¿ì¿¡ »ç¿ëÇÏ´Â ÈÅÀÔ´Ï´Ù. UndoManager ´Â ÆíÁý °á°úÀÇ ´ë±â¸¦ ÇØÁ¦Çϱâ Àü¿¡ ÀÌ ¸Þ¼Òµå¸¦ È£ÃâÇÕ´Ï´Ù. À̰ÍÀº ÇѹæÇâÀÇ Á¶ÀÛÀÔ´Ï´Ù. undie ¶ó°í ÇÏ´Â ¸Þ¼Òµå´Â ¾ø½À´Ï´Ù.

°ü·Ã Ç׸ñ:
CompoundEdit.die()

addEdit

public boolean addEdit(UndoableEdit  anEdit)
UndoableEdit ´Â °¡´ÉÇÑ °æ¿ì´Â anEdit ¸¦ ¼öÁß¿¡ ³Ö½À´Ï´Ù. anEdit °¡ ¾î¼ö¼±ÇØ ³¡³­ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false ¸¦ µ¹·ÁÁÝ´Ï´Ù.

Åë»ó, ¸®½Ã¹ö´Â ¹ú½á UndoManager (¶Ç´Â ´Ù¸¥ UndoableEditListener)ÀÇ Å¥¿¡ µé¾î°¡ ÀÖ¾îanEdit ¸¦ Å¥¿¡ Â÷·Ê·Î Ãß°¡ÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó, ±×°ÍÀ» ¼öÁß¿¡ ³ÖÀ» ±âȸ°¡ ÁÖ¾îÁý´Ï´Ù.

true °¡ µ¹·ÁÁÖ¾îÁö¸é(ÀÚ), ±× ÀÌÈÄ code>anEdit ´Â canUndo ¹× canRedo ·ÎºÎÅÍ´Â false ¸¦ µ¹·ÁÁÖ¾î,undo ³ª redo ¿¡´Â ÀûÀýÇÑ ¿¹¿Ü¸¦ ½½·Î¿ì ÇÕ´Ï´Ù.

ÆÄ¶ó¹ÌÅÍ:
anEdit - Ãß°¡µÇ´Â ÆíÁý °á°ú

replaceEdit

public boolean replaceEdit(UndoableEdit  anEdit)
ÀÌ UndoableEdit ¿¡ ÀÇÇØ anEdit °¡ ġȯµÇ´Â °æ¿ì´Â true ¸¦ µ¹·ÁÁÝ´Ï´Ù. ¸®½Ã¹ö´Â true ¸¦ µ¹·ÁÁÖ±â Àü¿¡ anEdit »óŸ¦ Â¥³Ö½À´Ï´Ù.

ÀÌ ¸Þ¼¼Áö´Â addEdit ÀÇ ¹Ý´ë±Ø¿¡ ÀÖ½À´Ï´Ù. Áï, anEdit ´Â Åë»ó UndoManager (¶Ç´Â ´Ù¸¥ UndoableEditListener)ÀÇ Å¥¿¡ ¹ú½á µé¾î°¡ ÀÖ¾î ¸®½Ã¹ö´Â ±×°Í°ú ¿Å°Ü³õÀ» ¼ö ÀÖÀ» ±âȸ°¡ ÁÖ¾îÁý´Ï´Ù.

true °¡ µ¹·ÁÁÖ¾îÁö¸é(ÀÚ), ±× ÀÌÈÄ anEdit ´Â canUndo() ¹× canRedo()·ÎºÎÅÍ´Â false ¸¦ µ¹·ÁÁÖ¾î, undo()³ª redo()¿¡´Â ÀûÀýÇÑ ¿¹¿Ü¸¦ ½½·Î¿ì ÇÕ´Ï´Ù.


isSignificant

public boolean isSignificant()
ÀÌ ÆíÁý °á°ú¿¡ Àǹ̰¡ ¾ø´Â °æ¿ì, ¿¹¸¦ µé¾î À¯ÀúÀÇ ¼±ÅÃÀº À¯ÁöµÇÁö¸¸ ¾î´À ¸ðµ¨ »óŵµ º¯°æµÇÁö ¾Ê´Â °æ¿ì¿¡, false ¸¦ µ¹·ÁÁÝ´Ï´Ù. UndoableEditListener ´Â (UndoManager ¿Í °°ÀÌ) ÀÌ »óŸ¦ »ç¿ëÇØ, ¾î´À UndoableEdit ¸¦ Undo/Redo ¿É¼ÇÀ¸·Î¼­ À¯Àú¿¡°Ô Á¦½ÃÇÏ´ÂÁö ´Ù¸¥ À̺¥Æ®¸¦ ¹ÙÅÁÀ¸·Î µÇµ¹¸®°Å³ª Àç½ÇÇàÇϰųª ÇÏ´Â °æ¿ìÀÇ ºÎÀÛ¿ëÀ¸·Î¼­ ¹«¾ùÀ» ½ÇÇàÇÒ±îÀÇ °áÁ¤À» ½Ç½ÃÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù.


getPresentationName

public String  getPresentationName()
º¯°æ ·Î±×µîÀ¸·Î »ç¿ëµÇ´Â ÀÌ ÆíÁý °á°úÀÇ, ÆÇµ¶ °¡´ÉÇÑ Áö¿ª¿¡ ´ëÀÀÇÑ ±â¼úÀ» Á¦°øÇÕ´Ï´Ù.


getUndoPresentationName

public String  getUndoPresentationName()
[¹ÙÅÁÀ¸·Î µÇµ¹¸®´Â (Undo)] ¸Þ´º Ç׸ñµîÀ¸·Î »ç¿ëµÇ´Â ÀÌ ÆíÁý °á°úÀÇ, ¹ÙÅÁÀ¸·Î µÇµ¹¸± ¼ö ÀÖ´Â Çü½ÄÀÇ ÆÇµ¶ °¡´ÉÇÑ Áö¿ª¿¡ ´ëÀÀÇÑ ±â¼úÀ» Á¦°øÇÕ´Ï´Ù. ÀϹÝÀûÀ¸·Î,getDescription ·ÎºÎÅÍ ÆÄ»ýÇÕ´Ï´Ù.


getRedoPresentationName

public String  getRedoPresentationName()
[Àç½ÇÇà (Redo)] ¸Þ´º Ç׸ñµîÀ¸·Î »ç¿ëµÇ´Â ÀÌ ÆíÁý °á°úÀÇ, Àç½ÇÇàÇÒ ¼ö ÀÖ´Â Çü½ÄÀÇ ÆÇµ¶ °¡´ÉÇÑ Áö¿ª¿¡ ´ëÀÀÇÑ ±â¼úÀ» Á¦°øÇÕ´Ï´Ù. ÀϹÝÀûÀ¸·Î,getPresentationName ·ÎºÎÅÍ ÆÄ»ýÇÕ´Ï´Ù.


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.