@Override public void propertyChange (PropertyChangeEvent evt) { progressLabel.putClientProperty (JComponent.TOOL_TIP_TEXT_KEY, evt.getNewValue ().toString ()); } });
public void resetRepresentativeAnchor() { if (representativeAnchor != null) representativeAnchor.putClientProperty(ToolWindowDescriptor.class, null); representativeAnchor = null; }
/** * Clear the wrapped line cache. * * @param l * the label containing a cached value */ protected void clearCache(final JLabel l) { l.putClientProperty(PROPERTY_KEY, null); }
JLabel component = ... ; component.putClientProperty("LabelUI.truncationString", ">");
private JLabel wrap (ImageIcon icon) { JLabel label = new JLabel(icon); label.setOpaque(false); label.putClientProperty("html.disable", Boolean.TRUE); return label; }
JPanel panel1 = new JPanel(); JLabel label1 = new JLabel(); label1.putClientProperty("associatedPanel", panel1);
JLabel label = new JLabel(); label.putClientProperty("id", new Integer(10));
protected void createNumberOfTrips() { $objectMap.put("numberOfTrips", numberOfTrips = new JLabel()); numberOfTrips.setName("numberOfTrips"); numberOfTrips.putClientProperty("sensitivityBean", fr.ifremer.isisfish.entities.StrategyMonthInfoImpl.class); numberOfTrips.putClientProperty("sensitivityMethod", "NumberOfTrips"); }
public MacOSXIntegrityCheckerPresentationPanel() { initComponents(); lbDataAmount.putClientProperty("JComponent.sizeVariant", "small"); lbDataProcessed.putClientProperty("JComponent.sizeVariant", "small"); lbElapsedTime.putClientProperty("JComponent.sizeVariant", "small"); lbRemainingTime.putClientProperty("JComponent.sizeVariant", "small"); lbSpeed.putClientProperty("JComponent.sizeVariant", "small"); if (!Beans.isDesignTime()) { populateImmediately(new IntegrityCheckerFieldsBean()); } }
public void setStyleProperties(JLabel renderer, TableCellStyle style) { if (style != null) { renderer.putClientProperty(PROPERTY_FORMAT, style.format); // NOI18N renderer.putClientProperty(PROPERTY_HIGHLIGHT_PATTERN, style.highlightPattern); // NOI18N ((JComponent) renderer).setToolTipText(style.tooltip); setRowColors(style, renderer); } }
private void setStyle() { messageLabel.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_LONG); SwingUtilities.updateComponentTreeUI(this); }
/** * Constructor */ public SplitedBackgroundPanel() { titleLabel.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_HEADER); add(titleLabel); }
/** * Add a settings entry * * @param translationKey * Translation key to read translation * @param settingComponent * Component to display */ private void addSetting(String translationKey, JComponent settingComponent) { JLabel header = new JLabel(Labels.getString(translationKey)); header.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_SHORT); settinsgPanel.add(header); settinsgPanel.add(settingComponent); }
@Override public void propertyChange(PropertyChangeEvent evt) { if ("opaque".equals(evt.getPropertyName())) { if (!Boolean.TRUE.equals(c .getClientProperty(SubstanceButtonUI.LOCK_OPACITY))) { c.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, evt.getNewValue()); // System.out // .println("PCL: " // + b.getText() // + "->" // + b // .getClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL) // ); } } } };
public void propertyChange(PropertyChangeEvent evt) { if ("opaque".equals(evt.getPropertyName())) { if (!Boolean.TRUE.equals(c .getClientProperty(SubstanceButtonUI.LOCK_OPACITY))) { c.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, evt.getNewValue()); // System.out // .println("PCL: " // + b.getText() // + "->" // + b // .getClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL) // ); } } } };
/** * Get the lines of text contained in the text label. The prepared lines is * cached as a client property, accessible via {@link #PROPERTY_KEY}. * * @param l * the label * @return the text lines of the label. */ @SuppressWarnings("unchecked") protected List<String> getTextLines(final JLabel l) { List<String> lines = (List<String>) l.getClientProperty(PROPERTY_KEY); if (lines == null) { lines = prepareLines(l); l.putClientProperty(PROPERTY_KEY, lines); } return lines; }
private void setStyle() { readyButton.setSize(new Dimension(READY_BUTTON_WIDTH, READY_BUTTON_HEIGHT)); readyButton.setMaximumSize(new Dimension(READY_BUTTON_WIDTH, READY_BUTTON_HEIGHT)); readyButton.setPreferredSize(new Dimension(READY_BUTTON_WIDTH, READY_BUTTON_HEIGHT)); readyButton.setMinimumSize(new Dimension(READY_BUTTON_WIDTH, READY_BUTTON_HEIGHT)); playerNameLabel.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_DYNAMIC); teamComboBox.putClientProperty(ELFStyle.KEY, ELFStyle.COMBOBOX); slotComboBox.putClientProperty(ELFStyle.KEY, ELFStyle.COMBOBOX); typeComboBox.putClientProperty(ELFStyle.KEY, ELFStyle.COMBOBOX); civilisationComboBox.putClientProperty(ELFStyle.KEY, ELFStyle.COMBOBOX); updateReadyButtonStyle(); }
@Override public void insertTab(String title, Icon icon, Component component, String tip, int index) { super.insertTab(title, icon, component, tip, index); //set custom label for correct work spotlighting in settings JLabel label = new JLabel(title); label.setIcon(icon); label.setBorder(new EmptyBorder(1,1,1,1)); setTabComponentAt(index, label); updateSelectedTabForeground(); label.putClientProperty(LABEL_FROM_TABBED_PANE, Boolean.TRUE); component.addHierarchyListener(this); UIUtil.setNotOpaqueRecursively(component); setInsets(component); revalidate(); repaint(); }
public void refresh() { if (getStrategyMonthInfo() != null) { numberOfTrips.putClientProperty("sensitivityBeanID", getStrategyMonthInfo().getTopiaId()); fieldStrategyMonthInfoMinInactivityDays.putClientProperty("sensitivityBeanID", getStrategyMonthInfo().getTopiaId()); TripTypeComboModel model = new TripTypeComboModel(getFisheryRegion().getTripType()); fieldStrategyMonthInfoTripType.setModel(model); fieldStrategyMonthInfoTripType.setSelectedItem(getStrategyMonthInfo().getTripType()); } else { // don't put in addPropertyChangeListener // if called after, remove content :( numberOfTrips.setText(""); fieldStrategyMonthInfoMinInactivityDays.setText(""); } }
public static void updateRenderer(JLabel c, String text) { View value = null; try{ View oldValue = (View)c.getClientProperty(propertyKey); if (isHTMLString(text)) { value = ScaledHTML.createHTMLView(c, text); } if (value != oldValue && oldValue != null) { for (int i = 0; i < oldValue.getViewCount(); i++) { oldValue.getView(i).setParent(null); } } } finally{ c.putClientProperty(BasicHTML.propertyKey, value); } }