Class Popup

java.lang.Object
com.jbstrap.core.messagebus.MessageBus
com.jbstrap.ui.Component<Popup>
com.jbstrap.jbmap.layers.layer.Popup

public class Popup extends com.jbstrap.ui.Component<Popup>

The Popup component

The component doesn't have a visual representation on the ui (only the popup frame), it's used to group other individual components together. The component appears in the HTML DOM as a div tag. Events can't be assigned to this component directly, but the components grouped under it can have events handlers.

Since:
4.0
  • Field Summary

    Fields inherited from class com.jbstrap.ui.Component

    animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
  • Constructor Summary

    Constructors
    Constructor
    Description
    Popup(com.jbstrap.ui.Component<?> component)
    Creates a Popup component and places the specified component inside it.
    Popup(com.jbstrap.ui.Component<?>... components)
    Creates a Popup and places the specified component in it.
    Create an empty Popup component
    Popup(String id, com.jbstrap.ui.Component<?> component)
    Creates a Popup component and places the specified component inside it.
    Popup(String id, com.jbstrap.ui.Component<?>... components)
    Creates a Popup and places the specified component in it.
  • Method Summary

    Modifier and Type
    Method
    Description
    addComponent(com.jbstrap.ui.Component<?> component, boolean draw)
     
    List<com.jbstrap.ui.Component<?>>
     
    protected List<com.jbstrap.ui.Component<?>>
    Get the popup's components
    protected void
    registerEvents(com.jbstrap.ui.Component<?> component)
    Run registering events of popup's components
    protected void
    runInitScript(com.jbstrap.ui.Component<?> component)
    Run init scripts of popup's components
    protected void
    setOpened(boolean isOpen)
    Set the popup is open or not on the screen
    boolean
     

    Methods inherited from class com.jbstrap.ui.Component

    _hide, _setAttribute, addAllowedRole, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, afterDraw, b, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, f, flattendComponentTree, g, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getName, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, init, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, isVisible, onHide, onHotKeyEventHandler, onShow, openTag, redraw, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEnabled, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setMargin, setName, setOverflow, setPadding, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setVisible, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass

    Methods inherited from class com.jbstrap.core.messagebus.MessageBus

    b, c, closeMessageBus, d, e, messageBusOpened, openMessageBus, sendMessageToMessageBus, subscribeMessageBus, unsubscribeMessageBus

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Popup

      public Popup(String id)
      Create an empty Popup component
      Parameters:
      id - The component ID. The ID specified here will appear in the HTML tag as an ID attribute. If there are multiple components displayed, that have the same ID, the ID numbers will be numbered, in the order they are displayed. (For example, if the ID is 'COMPONENT' then it will be numbered like this: COMPONENT, COMPONENT_1, COMPONENT_2 etc.)
    • Popup

      public Popup(com.jbstrap.ui.Component<?> component)
      Creates a Popup component and places the specified component inside it.
      Parameters:
      component - The component that will be put inside the Popup
      Throws:
      IllegalStateException - If the component is set to be both Private and Public, through an annotation.
    • Popup

      public Popup(String id, com.jbstrap.ui.Component<?> component)
      Creates a Popup component and places the specified component inside it.
      Parameters:
      id - The component ID. The ID specified here will appear in the HTML tag as an ID attribute. If there are multiple components displayed, that have the same ID, the ID numbers will be numbered, in the order they are displayed. (For example, if the ID is 'COMPONENT' then it will be numbered like this: COMPONENT, COMPONENT_1, COMPONENT_2 etc.)
      component - The component that will be put inside the Popup
      Throws:
      IllegalStateException - If the component is set to be both Private and Public, through an annotation.
    • Popup

      public Popup(com.jbstrap.ui.Component<?>... components)
      Creates a Popup and places the specified component in it.
      Parameters:
      components - The components that will be put in the Popup
      Throws:
      IllegalStateException - If the component is set to be both Private and Public, through an annotation.
    • Popup

      public Popup(String id, com.jbstrap.ui.Component<?>... components)
      Creates a Popup and places the specified component in it.
      Parameters:
      id - The component ID. The ID specified here will appear in the HTML tag as an ID attribute. If there are multiple components displayed, that have the same ID, the ID numbers will be numbered, in the order they are displayed. (For example, if the ID is 'COMPONENT' then it will be numbered like this: COMPONENT, COMPONENT_1, COMPONENT_2 etc.)
      components - The components that will be put in the Popup
      Throws:
      IllegalStateException - If the component is set to be both Private and Public, through an annotation.
  • Method Details

    • writeHTML

      public boolean writeHTML(StringWriter writer)
      Specified by:
      writeHTML in class com.jbstrap.ui.Component<Popup>
    • addComponent

      public Popup addComponent(com.jbstrap.ui.Component<?> component, boolean draw)
      Overrides:
      addComponent in class com.jbstrap.ui.Component<Popup>
    • getPopupComponents

      protected List<com.jbstrap.ui.Component<?>> getPopupComponents()
      Get the popup's components
      Returns:
      component list
    • getComponents

      public List<com.jbstrap.ui.Component<?>> getComponents()
      Overrides:
      getComponents in class com.jbstrap.ui.Component<Popup>
    • setOpened

      protected void setOpened(boolean isOpen)
      Set the popup is open or not on the screen
      Parameters:
      isOpen - true if opened and false if closed
    • runInitScript

      protected void runInitScript(com.jbstrap.ui.Component<?> component)
      Run init scripts of popup's components
      Parameters:
      component - The actual component
    • registerEvents

      protected void registerEvents(com.jbstrap.ui.Component<?> component)
      Run registering events of popup's components
      Parameters:
      component - The actual component