本文整理了Java中javax.swing.JLabel.putClientProperty()
方法的一些代码示例,展示了JLabel.putClientProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLabel.putClientProperty()
方法的具体详情如下:
包路径:javax.swing.JLabel
类名称:JLabel
方法名:putClientProperty
暂无
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
@Override
public void propertyChange (PropertyChangeEvent evt) {
progressLabel.putClientProperty (JComponent.TOOL_TIP_TEXT_KEY, evt.getNewValue ().toString ());
}
});
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public void resetRepresentativeAnchor() {
if (representativeAnchor != null)
representativeAnchor.putClientProperty(ToolWindowDescriptor.class, null);
representativeAnchor = null;
}
代码示例来源:origin: net.sf.kerner-utils/kerner-utils
/**
* Clear the wrapped line cache.
*
* @param l
* the label containing a cached value
*/
protected void clearCache(final JLabel l) {
l.putClientProperty(PROPERTY_KEY, null);
}
代码示例来源:origin: stackoverflow.com
JLabel component = ... ;
component.putClientProperty("LabelUI.truncationString", ">");
代码示例来源:origin: org.zaproxy/zap
private JLabel wrap (ImageIcon icon) {
JLabel label = new JLabel(icon);
label.setOpaque(false);
label.putClientProperty("html.disable", Boolean.TRUE);
return label;
}
代码示例来源:origin: stackoverflow.com
JPanel panel1 = new JPanel();
JLabel label1 = new JLabel();
label1.putClientProperty("associatedPanel", panel1);
代码示例来源:origin: stackoverflow.com
JLabel label = new JLabel();
label.putClientProperty("id", new Integer(10));
代码示例来源:origin: fr.ifremer/isis-fish
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");
}
代码示例来源:origin: it.tidalwave.solidblue/it-tidalwave-integritychecker-ui-swing
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());
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-bugtracking-commons
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);
}
}
代码示例来源:origin: jsettlers/settlers-remake
private void setStyle() {
messageLabel.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_LONG);
SwingUtilities.updateComponentTreeUI(this);
}
代码示例来源:origin: jsettlers/settlers-remake
/**
* Constructor
*/
public SplitedBackgroundPanel() {
titleLabel.putClientProperty(ELFStyle.KEY, ELFStyle.LABEL_HEADER);
add(titleLabel);
}
代码示例来源:origin: jsettlers/settlers-remake
/**
* 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);
}
代码示例来源:origin: com.github.insubstantial/substance
@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)
// );
}
}
}
};
代码示例来源:origin: org.java.net.substance/substance
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)
// );
}
}
}
};
代码示例来源:origin: net.sf.kerner-utils/kerner-utils
/**
* 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;
}
代码示例来源:origin: jsettlers/settlers-remake
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();
}
代码示例来源:origin: JetBrains/jediterm
@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();
}
代码示例来源:origin: fr.ifremer/isis-fish
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("");
}
}
代码示例来源:origin: freeplane/freeplane
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);
}
}
内容来源于网络,如有侵权,请联系作者删除!