Show grid in Papyrus class diagram - uml

I am looking for a grid / raster in Papyrus Neon, so I am able to align the components in my UML class diagram more precisely.
Is there such an option available? If so, where do I find it?
e.g. in ArgoUML such a grid is shown by default:
My research with Google was not successful either.

The easiest way to find properties like that is to use the search box at the top of the Properties drop-down menu. Type "grid" in there ant you will see that you can set diagrams that support grids an set your desired grid for each. Note tha the way to do this will change change slightly with Papyrus Oxygen, but the capability will remain.
Note that in the diagrams's toolbar, there are also actions to align model element representations (vertically/horizontally/spaced equally) or to make there sizes the same.

Related

Alloy: different instances for integer

I'm new to alloy and i'm doing a little project. In the project i have some instances with different attributes that, with magic layout, i can put in the instance when showing the model. Is there a way to do the same thing with integers? I attach an image that i hope can describe better my issue, in the image you can see that the attributes occupied and type are in the socket, but the socketID no. So, i also wanted to put the integers (for example) in the socket to have a show without some useless instances/relations. I tried with the same approach used for the other attributes but is not working. I think it's because is an integer and not a custom sig.
I hope that the question is clear and thanks a lot in advance.
Not sure it's due to Magical Layout, unless they have implemented a special treatment for ints.
Anyway, the solution is to customize the "theme" yourself:
open the theme customization panel (e.g. by clicking the Theme icon).
Now two trees are displayed on the left, representing (top) the signature hierarchy and (bottom) all relations in your model: click there on socketId and then, at the top of the left panel, tick "Show as attribute" and untick "Show as arc", then apply your new theme by clicking Apply (top right), then click Close to close theme customization.

Windows Explorer Navigation Bar in PyQt

What's the best approach to mimic the Windows Explorer navigation bar in PyQt?. Perhaps a list of QComboBoxes as part of a parent class that concatenates the current item of each combo box to resolve the final path?
Is it possible to get a similar look by using stylesheets?
This is the object I need to mimic. I just want a theoretical approach about the best way to mimic it.
Thanks in advance
This is technically known as a breadcrumb widget.
There are multiple approaches to this. The closest emulation to Windows Explorer's behavior--leaving out the normally hidden line editor--involves a chain of widgets like so:
A top level parent QWidget-derived class with your implementation, which would have:
A QHBoxLayout
An arbitrary number of QComboBoxes
A QFileSystemModel from which to populate the combo boxes.
Alternatives
You could use a single QLabels with a series of hyperlinks divided by path separators if you don't care about drop-down behavior. Qt Creator does this.
If your data source is static and not as gigantic as the filesystem, you could use QToolButtons backed by a tree of QAction/QMenus. This is possibly a masochistic approach, given that you have to populate all of the actions and menus. Since that's what they are there for, though, it might be handy as part of a context-sensitive menubar or tab bar.
I was looking for such a widget too without any luck. So I've tried to implement this by myself. It's not finished yet and needs some more work, but here's the first result: breadcrumbsaddressbar.
It's based on QToolButton widgets with menu. Parts of address which don't fit are hidden like in Windows Explorer. Also the widget has auto-completion feature.
Update: there's also a C++ widget QtAddressBar which I have't tried.

UMLDesigner – Diagram auto layout

I tried to use UMLDesigner to draw my project related diagrams. I see there is a Arrange functionality that can automatically layout diagram elements and links to save some manual work. But when i used it in my Activity diagrams it designed it upside down.
Here is an example. I created following simple activity diagram.
And here is how auto layout result for the same model looks like: auto layout.
The initial node is at the bottom and the final nodes are on top. But i want it the other way - to start at the top and end at the bottom. Is there a way to configure this?
I tried pinning starting and final nodes but it just made a mess after arranging the rest automatically. I searched the settings but couldn't find anything. I use UML Designer Version 7.1.0.
Thanks ahead for any help.
I am sorry there is no way from the preferences to change this behaviour.
This is because I never provide a specific layout for this diagram. Please, fill an issue in the bug tracker and it will be fixed for the next version of UML Designer as it is really easy to fix: https://github.com/ObeoNetwork/UML-Designer/issues.
Thanks for your feedback!

Enterprise Architect snap to grid doesn't work

I'm trying to use the "snap to grid" feature on Enterprise Architect Diagram mode and it seems like it's not working. All elements and connectors didn't snap to the defined grid size (they still moving freely - pixel by pixel - when I drag and move them).
Does somebody know how to snap all elements and connectors to grid or, at least, to move the connectors pixel by pixel - like elements do when pressing SHIFT + arrows?
for that you should use 'Snap to Grid' option from 'Diagram' menu.
There you can select one of two options: 'Standard Grid' and 'Smart Placement'
Documentation says:
Standard Grid - constrains elements to the grid when they are added to diagrams
Smart Placement - places elements even distances away from other elements and spaces elements evenly
If neither of these options are enabled, the elements can be placed freely on the diagram.
Ensure that you have that option enabled
If it is not working try to reload diagram after point 1
BTW. For alignment elements on a diagram you can use more options from context menu (select elements and click right button):

How to make grid view in j2me

I am very new in j2me. I want to design following type layout and components.
Mean I want to arrange my items in gridview. And after clicking on each item I will move to another form.
I am using simple lcdui. Please suggest me how can I do this. Means how can I arrange these items in gridview and what items should I use here buttons or something else.
You may provide me some suitable links.
In J2ME you have two options for UI: Form and Canvas.
Forms are a very simple way to display information without dealing with the graphical side of things, where Canvas is a blank screen and you need to draw the objects and their behaviors.
There is a third way: the guys at Sun has created a framework called (LWUIT which stands for Light Weight UI Toolkit). This toolkit provides the simplicity of Forms and the UI control of Canvas.
Hope i helped.

Resources