Author Topic: extend the on click event of relationship  (Read 19268 times)

charbel

  • Member
  • **
  • Posts: 24
Re: extend the on click event of relationship
« Reply #30 on: February 18, 2015, 12:58:46 PM »
Ok.

1. User creates a Business Actor in a View using the palette
2. A node is also created in the corresponding view, for example according to each business actor i need a
   technology node so it will not be on the same, it will be on the tehcnology view. yes i need to create it just in
   the model.
3. then i need to save the whole model in order to get the XMI extension

The idea of this, it's just to help the designer of the technology layer by creating some elements automatically.

do you need more clarification?

charbel

  • Member
  • **
  • Posts: 24
Re: extend the on click event of relationship
« Reply #31 on: February 19, 2015, 08:56:25 AM »
Your help is highly appreciated since it's a major point to continue my research.
It remains just 5 days for me.

Thank you

« Last Edit: February 19, 2015, 08:57:58 AM by charbel »

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1500
  • Archi Guy
    • Archi
Re: extend the on click event of relationship
« Reply #32 on: February 19, 2015, 09:10:22 AM »
I'm sorry, but I still do not know what you are trying to do. Your points (2) and (3) are confusing. Why don't you explain what it is step by step? Do you want two boxes to be drawn on the same view? If so, where?

What do you mean by "I need a technology node so it will not be on the same, it will be on the technology view." What technology view?

Then you say "I need to create it just in the model." So you don't want it added in the view?

"Then I need to save the whole model in order to get the XMI extension" What "XMI extension"?

I'm sorry but I don't think I can help you with this.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

charbel

  • Member
  • **
  • Posts: 24
Re: extend the on click event of relationship
« Reply #33 on: February 19, 2015, 09:58:37 AM »
I'm really sorry, maybe I explain wrong.
What I need is: For example I'm creating a business actor by drag a drop from the palette in order to create a model, after the creation of the business actor, I need to get automatically two technology nodes from the technology layer. these technology nodes could be created below the bsuiness actor created.
In another way, I need to know in java how to call a technology node during the dragging an drop from the palette of business actor.

Imagine your self you are using the archi tool and you are creating a business actor to create a specific model, what I need is to get automatically one or two technology nodes in the same model view.

Hope it's more clear now.

Sorry but really i need your help

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1500
  • Archi Guy
    • Archi
Re: extend the on click event of relationship
« Reply #34 on: February 19, 2015, 10:09:39 AM »
It's a bad UI decision. The palette should only be used for what it is intended - one item created. Maybe what you are trying to do is create a view from a template? Re-think your approach. Using the palette in this way would be a very bad user experience! How would one then create a Business Actor without the nodes being added!
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

charbel

  • Member
  • **
  • Posts: 24
Re: extend the on click event of relationship
« Reply #35 on: February 19, 2015, 10:16:34 AM »
I will tell you exactly what I have.
I have succeeded before to add dialog box in java when I'm using a realtion ship and I got a dialog box to enter a value, this value should respect a specific number for example. these values are 10 and 50 so I should enter a number between 10 and 50. once I enter a number between 10 and 50 so I can create the realtionship between any two business actor in the business layer.
What I need now is to call a technology node after using this realtionship. so just I need to assure that I can throw automatically some elements from other layers once I create any element from a specific layer.

There is a scientific idea from this, i have published till now three publications using ArchiMate and Archi tool, this is what I need.

Any feedback?

charbel

  • Member
  • **
  • Posts: 24
Re: extend the on click event of relationship
« Reply #36 on: February 19, 2015, 10:21:20 AM »
Attached is an image of How I have implemented what I explained in my previous post. I succeeded to extend ArchiMate and I got a generated design tool  using new relation ship with constraint (10 and 50).
In order to implement the idea (look the the images) I wrote inside CreateEditPart () the following:

int min = 10;
      int max = 50;       
      JFrame frame = new JFrame();
      String ValString = JOptionPane.showInputDialog(frame,"Length of marine cable should be between 10 and 50 meters:");
      int ValInt = Integer.parseInt(ValString);
      if (ValInt < max && ValInt > min){
         JOptionPane.showMessageDialog(null,"You are able to connect a Smart Sensor to a Fusion
                                                                              Server");
return new ExtensionConnectionEditPart();

      }
      JOptionPane.showMessageDialog(null,"You are not able to connect a Smart Sensor to a Fusion Server");
      return null;
   }

My question is what I have to write in jave to call for example a technology node automatically?
« Last Edit: February 19, 2015, 10:41:58 AM by charbel »

charbel

  • Member
  • **
  • Posts: 24
Re: extend the on click event of relationship
« Reply #37 on: February 20, 2015, 11:08:56 AM »
Hello again,

Any feedback?

Thank you

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1500
  • Archi Guy
    • Archi
Re: extend the on click event of relationship
« Reply #38 on: February 20, 2015, 12:19:15 PM »
As I said, I don't really know how to achieve what you want to do, and I think it's a bad idea from the point of view of the user anyway.

The only thing I can suggest is to take a look at the class:

com.archimatetool.editor.diagram.commands.CreateDiagramArchimateObjectCommand

and see how new objects are created there, and also in its super class:

com.archimatetool.editor.diagram.commands.CreateDiagramObjectCommand

If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate