Design panel
Mainly introduces the main methods and functions provided by BeanBoxFrame. Because BeanboxFrame is using a single mode, a large number of static member variables and static member functions are used. Such benefits are not needed to use the BeanboxFrame functionality by passing the reference, while executing the quote from complex calls in complex calls directly.
l Private Boolean InbeanBox (Component C) is used to determine if a bean instance is in Beanbox
l Public Void ActionPerformed (ActionEvent EVT) Operation menu event
l Public Void PropertyChange (PropertyChangeEvent EVT) Processing the DesignMode change event in property changes
l Static Void SetCurrentComponent (Component Focus) Sets the current component
l Public void Run () internal thread for handling changes in focus beans
l Private Void DosetCurrentfocus (Component Focus) Sets the current focus bean
l Public Void SetCustomizer (CUSTOMizer C) Set the property browser for the component
l Public Void LayoutContainer (Container Parent) Configuring the Layer Manager of the Container
l For Toolbox, Topbox, TopWrapper SET / GET Method
Then introduce beanbox, in BDK, this as a design container. Allows all Beans to be able to visualize the manipulation in Beanbox, you can use the associated property browser to browse and modify the associated property browser.
l Public Wrapper GetTopWrapper () Getting the top layer Wrapper also makes Beanbox
l Public Synchronized Void UpdateMenubar Sets the menu bar according to the current Beanbox and Bean
l Private Void AddMenuItem (BeanboxFrame Frame, Menu M, MenuItem Mi) Add menu item
l Private Synchronized String SerfileName (Object O) Create a marker for serialization specified objects
l Private Void SerializationComponent () Serialization Components to the specified file, implement the menu item of "SerializationComponent"
l Private void makeapplet () Menu item for "MakeApplet"
l Private void loading () Menu item for "Load"
l Private Void WriteObject (java.io.ObjectOutputStream OOS) is used to support serialization
l Private void readObject (java.io.objectInputStream OIS) is used to support serialization
l Private Void Print () Used to support the print of Beanbox content
l Private void loadjar () Menu item for "Loadjar"
l Private Void Cut () CUT operations for clipboard
l Private Boolean Copy () COPY operation of the clipboard
l Private Void Paste () Supports the Paste action of the clipboard
l Private Synchronized Wrapper getConnection (Wrapper SourceWrapper) Realize two beans links l void doeventhookup (ActionEvent EVT) Establish an event from the source to the target
l Private Rectangle getLocalcoordinates (Component C) Get the location of Bean in Beanbox
l Public Void MousePressed (MouseEvent EVT) Supports a mouse selection event
l Public Void Mouseeleased (MouseEvent EVT) Supports mouse release events
l Public Synchronized Void MouseDragged (MouseEvent EVT) Supports mouse drag
l Public Synchronized Void MouseMoved (MouseEvent EVT) Supports mouse movement
l Void DomenuiteM (ActionEvent EVT) This method is called to process the corresponding menu event by menuWorkeReread.
l Public void doinsert This method is used to insert a bean instance to beanbox
l Public Synchronized Void QueueMenuItem (ActionEvent EVT) is used to perform execution of the scheduled menu item in the thread of the process menu
l Public void Run () helps minimize the task of the AWT event thread to prevent deadlocks
l Void Startmove (Wrapper Child, INT X, INT Y) Set the position that starts moving
l Rectangle getMoveBox (int mx, int my) Drawing a mobile bean
l Void Finishmove (int MX, INT MY) Set the location where the move is stopped
l Void StartResize (Wrapper Child, INT X, INT Y, CURSOR CURSOR) Sets the size change
l Rectangle getResizeBox (int MX, int my) Gets Bean that changed the size
l void finishresize (int mx, int my) changes in size
l Void ResetViewMenu () Set the status of the menu display
toolbar
Toolbox inherits the Frame class, which mainly implements the specific functionality through ToolboxPanel.
l Void Addwithuniquename (Vector V, String S)
l Synchronized void addbeansinjar Adds Bean from JAR file to the toolbar
l Synchronized Void Addbeanclass (String BeanclassName) Used to register beanbox
l Public Dimension GetPreferredSize () Get the best size
l Public Void Paint (Graphics G) Redraw on display
l Public Void Run () Use an internal thread to process beans insert into the toolbar
l Public Vector getloadedjarInfo () Get information on load JAR files
l Private Static Vector getjarnames () Get the name of the JAR file to be loaded
l Method for implementing a mouselistener interface
Property browser
PropertySheet inherits the Frame class, which is mainly implemented through PropertySheetPanel. l Synchronized void setTarget (Wrapper Targ) Settings to be viewed bean
l void stretch () calls when window adjustment
l Private void doLayout (Boolean Dosetsize) Adjust the location of the interface
l Synchronized Void SetCustomizer (Customizer C) Sets the Customizer to which you want Property
l Synchronized Void Wasmodified (PropertyChangeEvent EVT) Performs the modification and related operations of the property (is a key way)
Tools
In order to assist the functional implementation of BDK, we will design a rich tool class, we will introduce in a new chapter.