IClipboard Item retrieve Item retrieve Nth int n
IClipboard + Item retrieve () + Item retrieve. Nth (int n) + Item retrieve (Data. Type type) + Item retrieve. Nth (int n, Data. Type type) + void clear () + void insert (Item item) + Enumeration types () «implements» Clipboard. Exception + Clipboard. Exception (String s) Clipboard Data. Type + Item retrieve () + Item retrieve. Nth (int n) + Item retrieve (Data. Type type) + Item retrieve. Nth (int n, Data. Type type) + void clear () + void insert (Item item) + Enumeration types () + Data. Type String s) + boolean equals (Data. Type dt) + String to. String () + boolean is. Sub. Type. Of (Data. Type dt) # Class resolved. Class 1 # Stack contents 1 1 1 Item java. lang. Stack + Object pop () + void push (Object o) + boolean is. Empty() # ? ? 1 * + Item (Data. Type dt, Object o) + Item (Item) + Data. Type get. Data. Type () + Object get. Object () # Data. Type type # Object obj George Heineman 9/21/2002 Class Model Version 1. 0. 1
Critical Evaluation of Version 1. 0 1. 2. Components that use IClipboard must know about the Item and Data. Type class. Specifically, the constructor for Item and Data. Type must be available The behavior of the clipboard is actually quite a bit different from a Stack! First, it can be cleared. Second, one can retrieve an item from deep within the stack. Third, when a paste operation occurs, the stack is not changed.
IClipboard implements IBlock + IItem retrieve () + IItem retrieve. Nth (int n) + IItem retrieve (IData. Type type) + IItem retrieve. Nth (int n, IData. Type type) + void clear () + void insert (IItem item) + Enumeration types () + IItem new. Item. Instance (IData. Type type, Object obj) + IData. Type new. Data. Type. Instance (String s) «implements» IItem + get. Data. Type () + Object get. Object () + IItem retrieve. Nth (int n) + IItem retrieve (IData. Type type) + IItem retrieve. Nth (int n, IData. Type type) + void clear () + void insert (IItem item) + Enumeration types () + Item new. Item. Instance (IData. Type type, Object obj) + IData. Type new. Data. Type. Instance (String s) + Clipboard () + activate () + boolean connect (IBlock ib, String interface. Name) + deactivate () + Enumeration get. Provided() + Enumeration get. Required() # Stack contents # Vector provided. V, required. V IData. Type 1 «implements» 1 java. lang. Stack «implements» Data. Type implements IData. Type Item implements IItem + Data. Type String s) + boolean equals (Data. Type dt) + String to. String () + boolean is. Sub. Type. Of (Data. Type dt) + Item (Data. Type dt, Object o) + Item (Item) + Data. Type get. Data. Type () + Object get. Object () # Class resolved. Class 1 1 # Data. Type type # Object obj * 1 + Object pop () + void push (Object o) + boolean is. Empty() # ? ? Clipboard. Exception + Clipboard. Exception (String s) George Heineman 9/23/2002 Class Model Version 1. 1. 1
Critical Evaluation of Version 1. 1 1. 2. Should we be worried about the unbounded nature of the clipboard? What if very-large depth is reached? Can we provide a standard GUI interface to the clipboard much like Microsoft-office does with its latest Office Clipboard
«implements» IClipboard + IItem retrieve () + IItem retrieve. Nth (int n) + IItem retrieve (IData. Type type) + IItem retrieve. Nth (int n, IData. Type type) + void clear () + void insert (IItem item) + Enumeration types () + IItem new. Item. Instance (IData. Type t, Object o) + IData. Type new. Data. Type. Instance (String s) Data. Type implements IData. Type IItem + IItem retrieve () + IItem retrieve. Nth (int n) + IItem retrieve (IData. Type type) + IItem retrieve. Nth (int n, IData. Type type) + void clear () + void insert (IItem item) + Enumeration types () + Item new. Item. Instance (IData. Type t, Object o) + IData. Type new. Data. Type. Instance (String s) + set. Accessor (IClipboard. Accessor ica) + show. Clipboard (boolean b) + Clipboard () + activate () + boolean connect (IBlock ib, String i. Name) + deactivate () + Enumeration get. Provided() + Enumeration get. Required() + Data. Type String s) + boolean equals (Data. Type t) + String to. String () + boolean is. Sub. Type. Of (Data. Type t) + get. Data. Type () + Object get. Object () # Stack contents # Vector provided. V, required. V IClipboard. Accessor + request. Clear() + request. Copy() + request. Paste. All() «implements» «extends» Paintable. Canvas 3 Clipboard implements IBlock IData. Type IClipboard. GUI + set. Accessor (IClipboard. Accessor i) + show. Clipboard (boolean b) «implements» # Class resolved. Class 1 Clipboard. GUI + activate. Frame (boolean b) + set. External. Accessor (IClipboard. Accessor i) 1 George Heineman 9/25/2002 1 java. lang. Stack 1 Item implements IItem + Item (Data. Type dt, Object o) + Item (Item) + Data. Type get. Data. Type () + Object get. Object () # Data. Type type # Object obj Class Model Version 1. 2 1 1 1 «implements» * + Object pop () 1 + void push (Object o) + boolean is. Empty() # ? ? Clipboard. Exception + Clipboard. Exception (String s)
Critical Evaluation of Version 1. 2. Ensure backward compatibility with earlier versions because IClipboard was not altered GUI usage will be inferred when set. Accessor() or show. Clipboard() is invoked.
- Slides: 6