NXKnowledge

NXOpen Java API Reference > nxopen.blockstyler

Package nxopen.blockstyler (Java)

This is the Java counterpart of NXOpen::BlockStyler (C++) / NXOpen.BlockStyler (.NET) — read nxopen-cpp-reference/blockstyler-namespace.md first for the full class-by-class catalog and the cross-reference to the Block UI Styler GUI tool. This file records only what is Java-specific.

Important distinction from nxopen.uistyler

This Java reference already has a separate file, nxopen-uistyler.md, in this same folder — do not confuse the two packages:

  • nxopen.blockstyler (this file) — the modern Block UI Styler runtime API, matching the C++/.NET BlockStyler namespace class-for-class (Button, ListBox, DoubleBlock, Group, SpecifyPoint, SelectObject, Tree, Wizard, DialogTester, etc.).
  • nxopen.uistyler — a different, older/parallel dialog runtime package (Styler, StylerItem, Dialog, DialogItem, CollapsibleGroup, PropertyPage, etc. — see that file's own notes). The two packages are not aliases of each other; nxopen.blockstyler is the one that corresponds directly to the .bx-authored Block UI Styler dialogs documented in this knowledge base's blockstyler/ folder.

Interfaces, not classes

Unlike the C++/.NET bindings — where BlockStyler members are concrete class types — the Java nxopen.blockstyler package declares its block types as interfaces (Java convention for the generated NXOpen binding; the actual implementing classes are internal/hidden, and calling code always programs against the interface type, e.g. nxopen.blockstyler. Button, nxopen.blockstyler.ListBox).

Confirmed matching type set (from the package summary page)

Verified present, matching the C++ class list one-for-one: AngularDimension, BlockDialog, BodyCollector, Button, ChooseExpression, CompositeBlock, CurveCollector, DialogTester, DoubleBlock, DoubleTable, DrawingArea, Enumeration, Explorer, ExpressionBlock, FaceCollector, FileSelection, FolderSelection, Group, IntegerBlock, IntegerTable, Label, LayerBlock, LinearDimension, LineColorFontWidth, LineFont, LineWidth, ListBox, MessageBoxTester, Microposition, MultilineString, Node, ObjectColorPicker, OnPathDimension, and more through the rest of the alphabet matching the C++ catalog (SpecifyPoint, SpecifyVector, Tree, TreeListMenu, UIBlock, Wizard, etc.).

Java-specific nested callback interfaces

Java's Javadoc surfaces each block's event-callback contracts as nested interfaces directly under the block interface, which is not how the C++ Doxygen page presents them (C++ lists callback typedefs separately). Examples observed on this package's page:

  • BlockDialog.Apply, BlockDialog.Cancel, BlockDialog.Close, BlockDialog.DialogShown, BlockDialog.EnableOKButton, BlockDialog.Filter, BlockDialog.FocusNotify, BlockDialog.Initialize, BlockDialog.KeyboardFocusNotify, BlockDialog.Ok, BlockDialog.Update — the full callback contract set a Java Block UI Styler dialog implements/registers against BlockDialog.
  • Explorer.NotifyNodeSelectedPostCallback, Explorer.NotifyNodeSelectedPreCallback — selection-change hooks for the Explorer tree-browser block.
  • ListBox.AddCallback, ListBox.DeleteCallback — item add/delete hooks for ListBox.

This nested-interface pattern is the main Java-specific idiom to know when translating a Block UI Styler C++/.NET code sample into Java: instead of assigning a delegate/function pointer, Java code implements the corresponding nested callback interface and registers it with the block.

Cross-reference

See nxopen-cpp-reference/blockstyler-namespace.md for the full class-level purpose descriptions (they apply verbatim here, since the underlying widget semantics are identical) and for how this namespace maps to the Block UI Styler GUI tool documented elsewhere in this knowledge base.

Source: https://docs.sw.siemens.com/en-US/doc/209349590/PL20220512394070742.open_java_ref · retrieved 2026-07-07