Global Widgets

This section provides brief descriptions of the global widgets that Nexaweb provides for Java application UI Development.

For more detailed information on any of the widgets, see the XAL Schema documentation.

Global widgets are widgets that you can define in a defs section of a UI file so that you can then use those widgets multiple places through out the UI file. For more information on using global widgets, see the documentation on the defs section.

linearGradient

A linearGradient defines a pattern that can be used as the background color of a component.

The following table lists and provides brief descriptions of the linearGradient specific element, stop, and its attributes:

Element\AttributeDescription
stopSpecifies the location and color of one of the transition points in the gradient.
offsetSpecifies the offset of this stop point. Value=percentage.
stop-colorSpecifies the color at this stop point. Value=color.

The following table lists and provides brief descriptions of the linearGradient specific attributes: 

AttributeDescription
x1 Specifies the span of a linear gradient pattern for the x1 coordinate. Value=0% or 100%.
x2Specifies the span of a linear gradient pattern for the x2 coordinate. Value=0% or 100%.
y1Specifies the span of a linear gradient pattern for the y1 coordinate. Value=0% or 100%.
y2Specifies the span of a linear gradient pattern for the y2 coordinate. Value=0% or 100%.

popup

A popup is a panel that appears in a pane in front of other components including windows and dialogs. Define a popup in the <defs> section of an application and then refer to it using the popup or tooltip attribute of another component.

Nexaweb Studio does not include popup as a standalone drag and drop widget in the Palette view.

The following example shows the syntax of a popup defined in a defs section and the use of the popup in a button:

<xal xmlns="http://openxal.org/ui/java">
  <defs>
   <popup id="myPopup">
    <verticalBoxPane backgroundColor="white">
     <label text="One"/>
     <label text="Two"/>
     <label text="Three"/>
     <label text="Four"/>
     <label text="Five"/>
    </verticalBoxPane>
   </popup>
  </defs>
  <rootPane>
   <borderPane>
    <desktopPane borderPosition="center">
     <horizontalFlowPane>
      <borderPane>
       <button text="Select" borderPosition="north" popup="#myPopup"/>
       <button text="OK" borderPosition="center"/>
       <button text="Apply" borderPosition="south" />
      </borderPane>
     </horizontalFlowPane>
    </desktopPane>
   </borderPane>
  </rootPane>
</xal>

The following figure shows the popup as defined in the above syntax:

The following table lists and provides brief descriptions of popup specific attributes: 

AttributeDescription
contextPopupSpecifies whether popup is a context popup, which appears when the popup trigger event occurs (typically right mouse release). If not a context popup, the popup does not display automatically when the popup trigger occurs. Set this as not a context popup in conjunction with a component's popupVisible attribute to create a popup that appears for events other than the popup trigger event.
true=contextPopup; false=not contextPopup. Default=true.