In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces EA drawing UML activity map how to achieve Object actions, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Background
Suppose you have a simple graphics editing software that derives two subclasses from a Shape base class, which are the Rectangle class and the Elipse class. Since it is editing software, of course, you need to set attributes, so the software prepares RectanglePropertyDlg and ElipsePropertyDlg for two kinds of graphics, both of which are inherited from PropertyDlg. The class diagram is as follows:
Example
Today's example is the process of creating a property dialog for an image, which we hand over to PropertyDialogCoordinator by calling the PropertyDialogCoordinator::proparePropertyDialog method.
The main functions of proparePropertyDialog are:
If the input drawing is different from the last processing, the generated dialog box is deleted, and the corresponding property dialog box is generated according to the type of input drawing.
If the input drawing is the same as the last time it was processed, return directly to the last generated dialog box without recreating it.
The processing flow is as follows:
I hope you are not scared, here are a few pieces to explain.
The first thing to execute is AcceptCallAction (the left sunken Pentagon), which has a total of three outputs after execution:
The red part. First execute ReadSelfAction to get the instance of PropertyDialogCoordinator and then call ReadStructrualFeatureAction twice with the instance as a parameter to obtain the currentShape that keeps the current drawing and the currentDlg that keeps the current dialog box for subsequent processing.
The pink part is the data stream, which provides the parameters of this process for subsequent processing: create the input graphics of the properties dialog box.
The blue part is also the data stream, providing input information for the final ReplyAction.
After the above preparatory work is done, use TestIdentityAction to determine whether the parameter graph and currentShape point to the same object: if the result is true, it means that the graph has generated a property dialog box, then pass currentDlg as the return value to ReplyAction, and the processing ends; otherwise, enter the subsequent processing.
The subsequent processing first calls DestroyObjectAction to destroy the currentDlg object, calls ReadIsClassifiedObjectAction to judge the type of input graphics, and calls CreateObjectAction to generate a matching property dialog box.
Next, WriteStructuralFeatureAction can execute twice, saving the created property dialog box and the input drawing to currentDlg and currentShape, respectively.
Finally, the ReplyAction is executed and the processing ends.
Thank you for reading this article carefully. I hope the article "how to achieve Object actions in EA drawing UML activity Diagram" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.