How to hide stereotypes labels from my profile - enterprise-architect

I have created a new profile for activity diagram in EA(Enterprise Architect).
The stereotype I created is named dummy. The profile is created with some activity diagram elements, but I use elements from my newly created profile, on top of each element, something like is seen with element name ยซdummyยป followed by the element name.
I would like to know if there is a way to hide the stereotype label. I have learned about shape script but couldn't figure it out well.
I am using EA version 13.

The only way (I know) is to turn off stereotype display for the whole diagram:
I first thought that DrawNativeShape in the shape script would work, but it also draws the stereotype. And it's near to impossible to show all compartments manually except for the stereotype. Just showing the class name (and individual drawings/texts) is simple. But showing attributes/operations and respecting the feature/diagram settings is near to impossible.

Related

Unity Dropdown shows the first time around, duplicated text

I am having this issue where I have a dropdown that should say finances, inventory, and stats. Which when you click on it will cause other panels of UI to appear. Now for some reason, the options it says it has is all Money:(which is the first item name of the first option). Why is that? I've attached images below that show what I mean.
Sorry about the links i dont have high enough rep yet
Duplicated Text of Money
Another instance of ^
My Tabs
Dropdown Setup
Let's take a closer look at your third and fourth pictures and compare them to the default Dropdown UI element.
So in your third image you show a similar tree but what happened to the Template GameObject? It appears you deleted this and replaced it with the Finances GameObject. This is your primary issue. You can't delete this Template GameObject portion of the Dropdown GameObject. The Template is utilized by the Dropdown code in order to further determine the style of the Dropdown you'll see while in game as well as provide you with a template to look at. I don't know all of the internals of how this works, but I know it for sure plays a roll in your issue.
I know this because now take a look at my Dropdown component. Look at the Template field in mine and compare it to yours. Your's is filled with Finances rather than Template, which is the reason that your Dropdown populates with fields from the Finances rather than the values you are trying to pass it.
Here is what I suggest you do. I'm assuming that the FinancesTab, InventoryTab and StatsTab are all UI elements you want to open upon clicking the respective Dropdown item. If that is the case:
Create a new Dropdown GameObject
Don't delete the Template GameObject within it and leave the Template field in the Dropdown GameObject as is
Add a script that utilizes the SetActive function for each UI element (place them in public fields) to the Dropdown GameObject
Set this code up so that when a certain item on the Dropdown is selected, it sets the desired UI Tab to SetActive(true);
Now reference the new script in the OnValueChanged(Int32) field and reference the correct Method from that script in the dropdown menu in the OnValueChanged(Int32) field.
I believe this should solve your problem and help you achieve what you want. Take a look at the Dropdown API and this Youtube tutorial on Dropdowns if my steps are confusing. You can definitely achieve what you want by following those two links (that's how I figured them out!).
Hope this helps!
Your caption is the gameobject 'Label' so its defaulting that in the dropdown because there are no sprites. I'm guessing Label has a text component that says 'Money'?

Typo3, set title for Mask Elements

I have a typo3 server and using the mask extension. When an editor creates a new mask element, there isnt a title in the list view. Its always "no title":
I checked the database and found the titles in the db in the field: tt_content.header but no way to set them automatically oder manually by an editor. Anyone have an idea how the title can be set automatically? Oder manually by an editor?
ext:mask has the option to reuse existing fields of tt_content for new kinds of content elements (CEs). use it to get the bonus of better interoperability with TYPO3.
TYPO3 has a logic how to show records (content elements) in the backend. one of it is the usage of the fields header and description. if you reuse these fields your CEs will look like others automatically.
If you use other fields you need to declare your fields for usage AND in case you change the kind of a CE from your kind to e.g. TEXT with Media the header stays.
Especially header is handled in the layout/partial of FSC or CSC global for any kind of CE. if the handling/rendering is changed (e.g. special layout) in an installation your CEs need special effort if they have their own building of the header.
Try to use the same fields as existing CEs and your life can be easier.
I'm having the same issue, but I found a way around it for the meantime. I edit the mask element and chenge its type to something elseโ€”like Textโ€”where I can set the title. After typing the title I save it, then change back to mask element and save again. This works by me without losing the content of the mask element. This way I can see the title in typo3 backend when I view as list or page or add content from another page. As I said, it doesn't solve the problem, but can help until there is a proper solution.
EDIT
I've just found another solution. You can add the title field to en existing mask element. To do it, go to ADMIN TOOLS > Mask, click your mask element to edit it. Add a new item by dragging the ๐—ฆ๐˜๐—ฟ๐—ถ๐—ป๐—ด item (the one on top of the list of available items) to the right where your items are. Then in General under ๐—–๐—ต๐—ผ๐—ผ๐˜€๐—ฒ ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ dropdown choose an ๐—˜๐˜…๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ด named:
๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ: (๐—ต๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ)
Save, close, go to your page to add your title. This still doesn't add the title field automatically to all mask elements, but it is a step forward.
If anywhere, you should be able to set a static title automatically in your page tsconfig. You could to something like
mod.wizards.newContentElement.wizardItems.mask.elements.[title of your mask element].tt_content_defValues {
header = My Awesome title
}
Personally, I usually give every mask element a header field and ask content editors to fill it in.
See also this discussion on Mask elements and backend titles.
Hope, this helps.

How to focus on an object in a diagram in Enterprise Architect?

Developing an Extension in Enterprise Architect, it's possible to call Repository.OpenDiagram() function and open a specific diagram. Using the Diagram.SelectedObjects, objects on that diagram can be selected and the list of the selected ones is accessible. However, there I need to focus on a selected object, but cannot find the corresponding EA API/function.
How could I focus on an object so that it be displayed in the center of diagram window (without changing the real position of the object)?
Thanks in advance for any hint!
You can't, except if you use a windows library to simulate clicks on the scrollbar or something like that.
But I'm not recommending that approach as you'll never be sure it will actually put the element in the center.

JavaFX 2 custom popup pane

The JavaFX 2 colour picker has a button that pops up a colour chooser pane like so:
I'd like to do something similar, in that I'd like a custom pane to pop up when the button is clicked on and disappear when something else is clicked (in my case, a few image thumbnails). What would be the best way of achieving this? Should I use a ContextMenu and add a pane to a MenuItem somehow, or is there something else I should look at?
It's kind of difficult to do well with the current JavaFX 2.2 API.
Here are some options.
Use a MenuButton with a graphic set in it's MenuItem
This is the approach taken in Button with popup showed below's executable sample code.
Use a PopupControl
Take a look at how the ColorPicker does this in it's code.
ColorPicker extends PopupControl. You could do this, but not all of the API required to build your own PopupControl is currently public. So, for JavaFX 2.2, you would have to rely on internal com.sun classes which are deprecated and will be replaced by public javafx.scene.control classes in JDK8.
Use a ContextMenu
So, I think your idea to "use a ContextMenu and add a pane to a MenuItem" is probably the best approach for now. You should be able to do this by using a CustomMenuItem or setting a graphic on a normal MenuItem. The ContextMenu has nice relative positioning logic. A ContextMenu can also be triggered by a MenuButton.
Use a Custom Dialog
To do this, display a transparent stage at a location relative to the node.
There is some sample code to get you started which I have temporarily linked here.
The sample code does relative positioning to the sides of the main window, but you could update it to perform positioning relative to the sides of a given node (like the ContextMenu's show method).
Use a Glass Pane
To do this, create a StackPane as your root of your main window. Place your main content pane as the first node in the StackPane and then create a Group as the second node in the stackpane, so that it will layer over the top of the main content. Normally, the top group contains nothing, but when you want to show your popup, place it in the top group and translate it to a location relative to the appropriate node in your main content.
You could look at how the anchor nodes in this demo are used to see how this might be adaptable to your context.
Is there a relevant update for this for JavaFX8?
There is not much difference of relevance for Java 8, in general the options are as outlined in this post based on Java 2.2 functionality. Java 8 does add Dialog and Alert functionality, but those are more targeted at use of dialogs with borders, titles and buttons rather than the kind of functionality desired in the question. Perhaps you might be able to start from the Dialog class and heavily customize it to get something close to what is needed, but you are probably better off starting from a blank stage or PopupControl instead.

Enterprise Architect class fill color

I have a very stupid question! I have created class diagram and right now I am trying to change class background fill color. I have not found any info in the help how to do that. Any suggestions?
Not a stupid question at all. There are a couple of different ways of doing this, depending on the scope you want.
To change the colour of one class in a single diagram, right-click it in the diagram. This opens up the context menu, but also opens a mini-toolbar. In this toolbar, the third icon from the left is the class fill colour. This toolbar can also be opened by selecting the class, and then clicking the middle of the three icons EA displays to the right of the class (the paintbrush).
Using this toolbar you can change the class colour locally. It does not affect how the class is displayed in other current or future diagrams, it is specific to the diagram you're in.
If you want to change the appearance of a class in all diagrams, right-click it and select Appearance -- Default Appearance. If you change the colour here, it will affect all future diagrams and all current diagrams except the ones where you've specified a local colour for the class as above.
Finally, you can change the EA-wide colour scheme in Tools -- Options -- Standard Colors. This affects all elements in all diagrams, unless you've specified something else for an element using either of the above methods.
In addition to these, if you create a profile you can specify a different appearance for a particular stereotype using shape scripts. But that's a different question.