Is there a way to move the x when hovering on mxgraph vertext? - mxgraph

As you can see there is a x when I'm hovring on mxgraph vertex. I need to remove it. Is there a way to do this?

Looks like you are using the grapheditor example.
If you want to remove them all, you have to exclude the Constraints from the Shape.js
GraphEditor - Shape.js
If you want to exclude them only from the cylinder, you need to check from which class your shape is derived from and then exclude only those constraints.

Related

libGDX: one actor on another input

I'm writing checkers and have two types of actors: checkers and squares. And have a listener that react if the square was touched. But this works only if the square is empty. If checker is placed on top I can't do anything. If there smth like "priority" of actor(?) or a method that could help?
Thx
Touches are processed in the opposite order that they are added to the Group. This is also the reverse of the order they are drawn, so if something is drawn on top of something, it will also have touch priority over what is behind it.
In this case, it sounds like you need to set all your checkers to not be touchable. actor.setTouchable(Touchable.disabled)

Can LibGDX do relative rendering when a sprite is a child of another?

With frameworks such as Cocos2d and SpriteKit, it is possible to add a sprite/label/node as a child of another. If a node is rotated, then the rendering of its children will be affected by such rotation and so on throughout the node tree.
Can this be achieved in LibGDX?
Yes this can be achieved using Scene2d.
Wiki Entry:
Rotation and scale of a group is applied to all child actors. Child actors always work in their own coordinate system, parent transformations are applied transparently.
What you are looking for is a scene Graph and this is provided as mentioned in the Scene2d api. What you do is, you create a group, add your sprite, e.g. a tank, add a label and other stuff. Then you can rotate the group and all children will be rotated with it. If you want just rotate the tank this is still possible but in most cases you just transform the root node, a Group.
The sprite itself is leave and if you won't to transform some sprites together you just put them in the same group and apply the transform their.
If you wanna create several 100 Sprites with a label together you could do this: Implement a RefNode which references a Group. Create a group where you add a sprite and a label. (if you wanna change the label text you would have to store it separately and update it before you actually render the referenced group) Then you can apply all the transformation to the RefNode.

JCheckbox change the text position

How do i change the position of the text in JCheckbox.
I want the text to be on the left of the check box and not as default on the right.
i been over the jcheckbox, jtooglebutton and jabstractButton api few times.
jCheckBox.setHorizontalTextPosition(SwingConstants.LEFT);
It's actually inherited from AbstractButton, but you can find this also for JLabels (in this case, it's relative to the icon you may use in the label).
Now this is assuming you want just a particular change on this one component. If your goal is to reverse the direction of all components in your application (for example for a right to left reading), you should probably look into component orientation, with the setComponentOrientation and applyComponentOrientation methods.
If you are trying to do this within Netbeans IDE select HorizontalTextPosition and change to leadingJCheckBoxProperties

Flex 4 -- Adding blur below pane

I'm looking to create a component like an Alert but with a bunch of components inside the pane. How can I create the blur effect below a pane?
Have a look at the AS docs here, there's a good example that will do what you want. Any DisplayObject can have filters applied to it
Alternatively, you can use something like TweenMax's dropShadowFilter to do it quickly and easily

How to create a custom GControl

I'm trying to create a gray "frame" (see pic below) around a google map, to try to convey the concept of an area of focus, as oppose to a point (which is usually represented with a marker). Note that this is not an overlay, that is, the gray "frame" should not move when you drag the map.
Edited: image link added
It appears that only option is to "subclass" GControl to create a custom control. I have 3 questions
1) First of all, is GControl subclassing the best course of action?
2) In my example, the canvas (div) where map renders can change its size (i.e is not fixed width). Do I have to delete and add custom control when canvas changes size? See docs http://code.google.com/apis/maps/documentation/controls.html#Custom_Controls on how to create a custom map control.
3) Now, how to do it. Naively, I thought I could create a table with 3 columns and 3 rows, and set display: none for the cell in the middle. But that doesn't work. I've also experimented with clipping, that didn't work either. My css skills are quite lacking, so there must be way to do this more elegantly than adding four rectangular gray divs. If I wanted to add an inner border, with divs, I would need to paint 8 then. In a nutshell, what's the best way to create a "hollow" rectangle?
Thanks
P.S. This is my first entry to StackOverflow. Just discovered it. It's impressive how well SO is put together.