private void refreshImages() { if (showButtons) { refreshCounterText(); } if (refreshOverNull) { for (int i = 0; i < m_aButtons.length; i++) { setVisible(m_aButtons[i], false); } } for (int i = 0; i < m_aButtons.length; i++) { Object oObj = getObjectFor(i); if (oObj == null) continue; Object[] oResources = renderer.getImageUrls(oObj); if (oResources == null) continue; if (oResources.length == 1) { Helper.setUnoPropertyValue( m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]); } else if (oResources.length == 2) { oUnoDialog .getPeerConfiguration() .setImageUrl(m_aButtons[i].getModel(), oResources[0], oResources[1]); } boolean bTabStop = Boolean.TRUE; // focusable ? Boolean.TRUE : Boolean.FALSE; Helper.setUnoPropertyValue(m_aButtons[i].getModel(), "Tabstop", bTabStop); if (refreshOverNull) { setVisible(m_aButtons[i], true); } } }
/** set the text under the button list */ private void refreshImageText() { Object item = m_nCurrentSelection >= 0 ? getListModel().getElementAt(m_nCurrentSelection) : null; final String sText = PropertyNames.SPACE + renderer.render(item); Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, sText); }