javafx8 scenebuilder menu shows controls labeled for container object - javafx-8

When I place JavaFX object inside a container, for example some checkboxes inside an hbox:
The scenebuilder controls for each checkbox show the container object in the menu (and different settings are shown here depending on the actual container):
But changing the "margin" value here, for example, clearly affects the individual checkbox and not the HBox. For example, setting only the middle checkbox to have a left margin of 20 yields a change to only the middle checkbox:
So why is that menu area labeled with the container name? I fear I am missing some fundamental design aspect by not understanding this.

They are properties of the control that are specifically available when its parent is an HBox. They correspond to the static methods HBox.setXXX(node, value), e.g. HBox.setHgrow(...).
If you put the check box in an AnchorPane instead, for example, you would see "Anchor Pane Constraints" instead of "HBox Constraints" and you would have options including "TopAnchor", "LeftAnchor" etc., corresponding to the static AnchorPane.setXXX(node, value) methods.

Related

How to rearrange or remove contents under #BODY# in oracle apex

So basically I'm new to oracle apex, i have created a blank page in an mobile application in apex and then created a static region having a select list.
Noticed that the select list item is to the right of the screen, i know i can use css to move it to the required spot, but when I did a page inspection, noticed that #BODY# had other divs as well and wanted to know whether the divs or spans under #BODY# can be edited, if so from where and how?
OK then, a Select List item it is.
Select it
in its properties (on the right hand side of the screen), you'll see the Layout section
in there, there are some properties you might find interesting
column - set to "Automatic" by default, and yes - it positions the item "right" on the screen (I don't know why Apex authors decided to do it that way; I'd be happier if it was "left"), somewhere to the 4th of 5th column. What does that column mean? When you run the page, there's the bottom toolbar available to developers. In version 5.x, there's the option (I can't remember its name; most probably it is "Show layout columns") which enables you to show the grid - you'll see vertical "lines" (columns) and see where's each of your items positioned. On Apex 18.1 (available at apex.oracle.com), you'd click "Page info" and select "Show layout columns".
so, if you want to move it left, set the "Column" property to 1 (1st column on the screen)
modifying the "Column" property might require adjusting two additional properties: "Column span" and "Label column span".
I suggest you try to set those properties to different values and see what happens. Apex will inform you if you set something irregular.

Bokeh - How to use box tool without default selections?

I have built a bokeh app that allows users to select windows in data and run python code to find and label (with markers) extreme values within these limits. For ease of interaction, I use the box select tool for the range selection. My problem arises when repeating this process for subsequent cases. After markers are placed for the results, they are rendered invisible by setting alpha to zero and another case needs to be chosen. When the new select box includes previous markers, they become visible based on the selection. How do I override this default behavior? Can markers be made unselectable? or can I add code to the customJS to hide them after they are selected?
Thanks in advance for any help!
There are a few possible approaches. If you just want non-selected glyphs to "disappear" visually, you can set a policy to do that as described here:
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs
Basically, for bokeh.plotting, pass
nonselection_fill_alpha=0.0,
nonselection_line_alpha=0.0,
as arguments to your plot.circle call or whatever. Or if you are using the low level bokeh.models interface, something like:
renderer.nonselection_glyph = Circle(fill_alpha=0.0, line_alpha=0.0)
But be aware (I think you already are) that the invisible markers are still there, and still selectable if the user happens to draw a box over them with the selection tool.
If you truly want only a subset of the data to be visible and selectable after a selection, I'd say you want to replace the data in the column data source wholesale with the subset in your selection callback.

Keep node selection from spreading to PropertySheet

I'm developing an application based on the netbeans platform.
The problem I'm having is this; I have a TopComponent that contains two panels, A and B, each with a ExplorerManager. I have two BeanTreeViews in each panel with different sets of nodes. When I change selection in the A panel, the nodes in the B panel will be created. Now, I'd like to be able to select a node in the B panel and see it's properties in the default property view. But I still have a selected node in the A panel, and therefore the property view only says 'Multiple objects.' Is there any way to keep the selection in the A panel from spreading to the PropertyView?
I'd like to be able to use NodeActions on both sets of nodes, and therefore I've added
associateLookup(new ProxyLookup(
ExplorerUtils.createLookup(PanelA.getExlporerManager(), map),
ExplorerUtils.createLookup(PanelB.getExplorerManager(), map)
));
to the TopComponent if i only associate PanelA's ExplorerManager then this isn't a problem.
Ok some after testing around I found a solution that works for me. Perhaps I was a bit quick to post this question. Anyway;
In the TopComponent I did
associateLookup(new ProxyLookup(
ExplorerUtils.createLookup(PanelA.getExlporerManager(), map)
));
Then only the Nodes in PanelA will be spread to the PropertyView. And then to get the NodeActions to work in PanelB, I made it implement Lookup.Provider, and created it's Lookup with
lookup = ExplorerUtils.createLookup(explorerManager, map);

Access Form layout and design: Header: How do I make my header section look like Google

I would like to rip off Google's design for my Continuous Form. The detail section of the form is set up to display N number of records resulting from a search, and thus cannot be used to create this effect (i think). Everything must go in the header section.
there are 2 primary issues I would like to address in this question:
Two toned background. The header section should have a grey stripe and a white stripe. This stripe needs to extend the full width of the form, which is variable and will depend on the user. (i'm using tabs not pop-ups)
How to right justify certain elements of the header so that they stay close to the right edge, wherever that may fall, just like your account information on Google.
The "Search Results" in the detail section are loaded by setting the form's recordSource to the results of a query defined in VBA, which takes parameters from the search box. The form is continuous.
Any ideas how to hack this into place?
Recent versions of MS Access provide improved form layout features when using the ACCDB database file format.
The screen captures below are based on a form in Access 2010. The second image is after the form width was expanded, but it's scaled down for display on this web page. However you can open those images directly to compare their relative widths.
The grey color is from the form header's Back Color property. The white box is a simple text box whose Back Color is white and Back Style is Normal (not Transparent).
The text box's Horizontal Anchor property is Both, and its Can Grow property is Yes. The other 3 items ("?", "Button 2", and "Button 3") are command buttons. Their Horizontal Anchors are set to Right and their Can Grow properties are No.
The result of those properties is that when the form expands, those command buttons maintain their size are are kept right-aligned within the form. And the text box stretches to fill the remaining available space.
Note this behavior is accomplished without any VBA code.
I think these layout capabilities were introduced in Access 2007 and perhaps refined in 2010.
For the background, use two rectangles with transparent borders, one back color gray, one white. You can size them to the form by using the form's InsideWidth property. For example:
Private Sub Form_Resize()
rect1.Width = Me.InsideWidth
rect2.Width = Me.InsideWidth
End Sub
I would do a similar thing for the buttons/images/etc you want right justified. Set their Left property relative to the form's width:
mySettingsButton.Left = Me.InsideWidth - 300
Keep in mind all the measurements are twips (1440 twips/inch)

Eclipse ui: retrieving the first visible line of an editor

In the Eclipse UI, I'd like to set the visible area in an editor. In other words, if the number of lines of my file is larger than the number of lines my editor can show then I want to specify the first shown line. My first approach was to calculate the first visible line via the selection value of its vertical scroll bar. The following link points to my initial question. Its answer explains how to set the first visible line in an editor.
eclipse ui: setting scrollbar but editor does not follow
The problem now is that my initial way of retrieving the first visible line in an editor fails in some cases: Although I verify that the active page is indeed an editor, the focus might be assigned to another page. In such a case, the following code yields the ScrollBar of a different page:
public static void update(final IWorkbenchWindow w)
final Scrollable scrollable =
(Scrollable) w.getWorkbench().getDisplay().getFocusControl();
final ScrollBar vScrollBar = scrollable.getVerticalBar();
So, my question: If editor is the reference of an active editor (ITextEditor and IReusableEditor), how to I get its first visible line?
If you can access the editor ITextViewer or its extension ISourceViewer (usually implemented by the SourceViewer or TextViewer class) you can call the ITextViewer.getTopIndex() method to get the top line index.
If your editor is derived from AbstractTextEditor (or one of its subclasses such as TextEditor) there is a protected method getSourceViewer() that returns this. You may have to add a public method if you want to access this from outside of the editor.