Public static class StatusPredicate implements HighlightPredicate isHighlighted(. Table.getColumn(.).setCellRenderer(new DefaultTableRenderer(new MappedValue(StringValues.EMPTY, iv) Return IconValues.EMPTY // or null or whatever Return stateIconMap.get(value.getState()) The latter can be conditionally switched on/off - controlled by a HighlightPredicate. "visual decoration", in SwingX vocabulary that maps to "StringValue" (and Icon- and Boolean- and Mapped- which is the combination of all) which is basically a mapping of cell value into its String/Icon representation vs. The separation line is somewhat like "content" vs.
Sure the doc could use a bit effort - feel free to contribute, everybody, after all, it's a wiki and each member of has write access -) getRenderer().setBackground(Color.GREEN) GetRenderer().setPainter(StatusColouringHelper.getStatusPainter(cv.getStatus())) If (SyncTableProperties.isChangeColouring())Ĭolor colour = StatusColouringHelper.getColour(cv.getStatus()) Protected void renderCellSelection(int row, final Object value, final boolean isSelected, final boolean hasFocus) * Setup the Cell Colours dependent on the status of the contents RenderCellSelection(row,value,isSelected,hasFocus) GetRenderer().setIcon(statusIconMapping.get(cv.getStatus())) Public Component getTableCellRendererComponent(final JTable table, Private JRendererLabel label = new JRendererLabel() StatusIconMapping.put(Cell.STATUS_LINK,()) StatusIconMapping.put(Cell.STATUS_NOT_SUPPORTED,()) StatusIconMapping.put(Cell.STATUS_CLOSED,()) StatusIconMapping.put(Cell.STATUS_PHYSICALLY_DELETED,()) StatusIconMapping.put(Cell.STATUS_MISSING,()) StatusIconMapping.put(Cell.STATUS_DELETED,()) StatusIconMapping.put(Cell.STATUS_EDITED,()) StatusIconMapping.put(Cell.STATUS_UNCHANGED,()) Private static Map statusIconMapping = new HashMap (4) Public static StatusRenderer getInstance() Public class StatusRenderer extends AbstractTableCellRenderer * Renders the status column, showing an icon to indicate song edit status
Heres the code for the renderer, With the two workarounds commented out) Is this a bug in JRenderLabel or am I misundersanding something ? If I change the code to create a new JRendererLabel each time then it works okay. EText typeSmart OSX v.3.3 eText typeSmart OSX 3.3 is a very flexible and effective tool which can help you learn to type in just 6 hours using the Direct. The complete icon theme is available at the developers site.
If I use setbackground() instead of setPainter() it works okay. In Vitro OSX for Mac OS v.1.0 Contains 7 icons in HD (high definition) for Mac OSX and Windows You never will see so real glass icons like these. album, composer, but retain the option of selecting individual works through the "Work" tab.Im trying out JRenderLabel (Using swingx 1.0) for rendering a table cell, the background shoudl be different depending on the value of the cell, what Im finding is that i just use the same instance of JRenderLabel() for all cells and use setPainter() then when the value of one cell is changed the backgrounds of all cells are being painted to match the changed cell.ĪFAIK you shold be able to just use one instance of the renderer for all cells. So ideally what I would like is to retain the option of playing the whole album, through selection using any of the tabs e.g. I have experimented with one album by removing the Minimserver Group entries for each song, which re-instates the complete album option but then does not enable me to play each "work" from that album, it only lists the separate songs (tracks) for the work from that album. I believe this has been caused by my duplicating the songs (tracks) in Work and Minimserver Group on SongKong? It is useful for albums that contain many short works to be able to play the whole album rather than having to open and play each Work (track(s)) separately. In auto and manually editing albums in SongKong I have found that whilst the separate Works are correctly displayed under "Work" on my Naim App/iPad control point and sorted by Composer now, I have lost the display of the whole album (all works in that album) which previously were displayed in for example, "Albums" and in "Complete Album" in the Work tab. However, in working through this I have an issue which I'll explain below for which Paul suggested I use the Minimserver forum. Simon, I've been exchanging posts with Paul Taylor on the SongKong forum regarding trying to accurately format my albums by adding Composer to Work.