Class StringTableCellRenderer

    • Constructor Detail

      • StringTableCellRenderer

        public StringTableCellRenderer​(Property<String> property)
      • StringTableCellRenderer

        public StringTableCellRenderer​(Property<String> property,
                                       boolean showTooltip)
    • Method Detail

      • getApplication

        public BeaTunes getApplication()
      • getSearchableText

        public String getSearchableText()
        The substring of the displayed text that is searchable. This allows displaying more than teh searchable part.
        Returns:
        either the same as the regular text or a substring of JTextComponent.getText().
      • setSearchableText

        public void setSearchableText​(String searchableText)
      • setProperty

        public void setProperty​(Property<String> property)
      • getToolTipText

        protected String getToolTipText​(String property,
                                        Object formattedProperty)
      • getIssue

        public Issue getIssue()
      • paintIssueHighlight

        protected void paintIssueHighlight​(Graphics g)
      • getIssueHighlightBounds

        protected Rectangle getIssueHighlightBounds​(Graphics g)
      • getIssueHighlightWidth

        protected int getIssueHighlightWidth​(Graphics g)
      • formatProperty

        protected String formatProperty​(String property)
        Returns a formatted version of the given property to be displayed in the UI. By default returns an empty String for null, otherwise the property itself. If you would like to format the given property somehow, do it here.
        Parameters:
        property - typed property
        Returns:
        formatted property
        See Also:
        searchableProperty(String)
      • searchableProperty

        protected String searchableProperty​(String property)

        Returns a formatted version of the given property that is searchable. Whatever this method returns, it must be either the same or a substring of what formatProperty(String) returns.

        By default returns an empty String for null, otherwise the property itself. If you would like to format the given property somehow, do it here.

        Parameters:
        property - typed property
        Returns:
        formatted property
        See Also:
        formatProperty(String)
      • extractProperty

        protected String extractProperty​(Object object)
        Typically simply calls propertyExtractor.get(value). If you want to convert some values into special (other) values (e.g. 0 into null), override this method.
        Parameters:
        object - object
        Returns:
        property value
      • updateUI

        public void updateUI()
        Notification from the UIManager that the look and feel [L&F] has changed. Replaces the current UI object with the latest version from the UIManager.
        Overrides:
        updateUI in class JTextComponent
        See Also:
        JComponent.updateUI()
      • repaint

        public void repaint​(long tm,
                            int x,
                            int y,
                            int width,
                            int height)
        Overridden for performance reasons. See the Implementation Note for more information.
        Overrides:
        repaint in class JComponent