Class ArrayLine

    • Constructor Detail

      • ArrayLine

        public ArrayLine​(ArrayPane pane)
    • Method Detail

      • addSubline

        public void addSubline​(ArrayLine subline)
      • setStyleSheet

        public void setStyleSheet​(String css)
      • getStyleSheet

        public String getStyleSheet()
      • addArrayCellText

        public <T> ArrayCellText addArrayCellText​(T instance,
                                                  Function<T,​String> lazyText)
        The text of the cell is computed from a Function applied to the given instance parameter.
        The function takes in input the given instance and the result must be a String.
        The advantage of this way of use is that the text is computed only when the line is displayed. So that can be see as a lazy computation.
        Once the text computation is done, it is cached so that the computation is performed at most one time.
        Parameters:
        instance - the instance in input of the function.
        lazyText - the function to apply to the instance.
        Returns:
        an array cell text.
      • addArrayCellText

        public ArrayCellText addArrayCellText​(int number)
      • addArrayCellText

        public ArrayCellText addArrayCellText​(float number)
      • addArrayEmptyCell

        public void addArrayEmptyCell()
      • addArrayCellInputText

        public ArrayCellInputText addArrayCellInputText​(String name,
                                                        String value)
        This method permit to add a input box without format in the arrayPane. Input box parameters are name and value
        Parameters:
        name - name of the input
        value - value of the input
      • addArrayCellInputText

        public ArrayCellInputText addArrayCellInputText​(ArrayCellInputText cell)
        To add an ArrayCellInputText to an ArrayLine
        Parameters:
        cell - the cell to add
        Returns:
        the added cell
      • addArrayCellSelect

        public ArrayCellSelect addArrayCellSelect​(String name,
                                                  String[] labels,
                                                  String[] values)
        This method permits to add a select drop-down box without format in the arrayPane. Select box parameters are name, labels and values
        Parameters:
        name - The name of the element
        labels - an array of Labels to display
        values - an array of Values to return
        Returns:
        an ArrayCellSelect object.
      • addArrayCellButton

        public ArrayCellButton addArrayCellButton​(String name,
                                                  String value,
                                                  boolean activate)
        This method permit to add a button in the arrayPane. Button parameters are name, value, and if the button is disabled or not.
        Parameters:
        name - the button name.
        value - the button value.
        activate - if the button is enabled or not.
      • printPseudoColumn

        public static String printPseudoColumn()
      • printWithPseudoColumns

        public String printWithPseudoColumns()
        This method works like the print() method, but inserts pseudo columns after each column. This is useful when a 0 cell spacing is used.
      • compareTo

        public int compareTo​(@Nonnull
                             ArrayLine other)
        Compares this array line with the specified one by the cell in the same sortable column.

        This comparing function is not about array line equality meaning the following property (x.compareTo(y)==0) == (x.equals(y)) is broken.
        Specified by:
        compareTo in interface Comparable<ArrayLine>
      • hashCode

        public int hashCode()
        Computes the hash code of this ArrayLine. Two same array lines have the same hash code.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code of this ArrayLine.
      • setId

        public void setId​(String id)
      • getId

        public String getId()