本文整理汇总了Java中org.jdesktop.beansbinding.BeanProperty类的典型用法代码示例。如果您正苦于以下问题:Java BeanProperty类的具体用法?Java BeanProperty怎么用?Java BeanProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BeanProperty类属于org.jdesktop.beansbinding包,在下文中一共展示了BeanProperty类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: HighlighterControl
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
public HighlighterControl() {
matte = new MattePainter(PaintUtils.setAlpha(base, 125));
tableValueBasedHighlighter = new RelativePainterHighlighter(matte);
table.addHighlighter(tableValueBasedHighlighter);
treeTable.addHighlighter(tableValueBasedHighlighter);
valueBasedHighlighter = new RelativePainterHighlighter(matte);
list.addHighlighter(valueBasedHighlighter);
tree.addHighlighter(valueBasedHighlighter);
setSpreadColumns(false);
BindingGroup group = new BindingGroup();
group.addBinding(Bindings.createAutoBinding(READ,
extendedMarkerBox, BeanProperty.create("selected"),
this, BeanProperty.create("spreadColumns")));
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:19,代码来源:HighlighterExtDemo.java
示例2: bind
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bind() {
BindingGroup group = new BindingGroup();
group.addBinding(Bindings.createAutoBinding(READ,
datePicker, BeanProperty.create("date"),
dateEchoField, BeanProperty.create("value")
));
group.addBinding(Bindings.createAutoBinding(READ,
interactivity, BeanProperty.create("selected"),
datePicker, BeanProperty.create("enabled")
));
group.addBinding(Bindings.createAutoBinding(READ,
editability, BeanProperty.create("selected"),
datePicker, BeanProperty.create("editable")
));
Binding b = Bindings.createAutoBinding(READ,
orientation, BeanProperty.create("selected"),
datePicker, BeanProperty.create("componentOrientation"));
b.setConverter(new ComponentOrientationConverter());
group.addBinding(b);
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:27,代码来源:DatePickerDemo.java
示例3: start
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
* Callback method for demo loader.
*/
public void start() {
if (oscarModel.getRowCount() != 0) return;
//<snip>Use SwingWorker to asynchronously load the data
// create SwingWorker which will load the data on a separate thread
SwingWorker<?, ?> loader = new OscarDataLoader(
XTableDemo.class.getResource("resources/oscars.xml"), oscarModel);
// display progress bar while data loads
progressBar = new JProgressBar();
statusBarLeft.add(progressBar);
// bind the worker's progress notification to the progressBar
// and the worker's state notification to this
BindingGroup group = new BindingGroup();
group.addBinding(Bindings.createAutoBinding(READ,
loader, BeanProperty.create("progress"),
progressBar, BeanProperty.create("value")));
group.addBinding(Bindings.createAutoBinding(READ,
loader, BeanProperty.create("state"),
this, BeanProperty.create("loadState")));
group.bind();
loader.execute();
// </snip>
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:27,代码来源:XTableDemo.java
示例4: bindSelection
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bindSelection(Object... components) {
painterDemos.setCellRenderer(new DefaultTreeRenderer(
DisplayValues.DISPLAY_INFO_DESCRIPTION));
Converter<?, ?> painterConverter = new DisplayInfoConverter<Painter>();
BindingGroup group = new BindingGroup();
for (int i = 0; i < components.length; i++) {
BeanProperty p = BeanProperty.create(
i == 0 ? "backgroundPainter" : "painter");
Binding b = Bindings.createAutoBinding(READ,
painterDemos, BeanProperty.create("selectedElement_UNWRAP_NODE"),
components[i], p);
b.setConverter(painterConverter);
group.addBinding(b);
}
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:19,代码来源:PainterDemo.java
示例5: updateAreaBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void updateAreaBindings() {
if (areaEnabled) {
areaGroup = new BindingGroup();
areaGroup.addBinding(Bindings.createAutoBinding(READ,
paintStretchedBox, BeanProperty.create("selected"),
painter, BeanProperty.create("paintStretched")));
areaGroup.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ,
styleBox, BeanProperty.create("selectedItem"),
painter, BeanProperty.create("style")));
Binding effectsBinding = (Bindings.createAutoBinding(READ,
effectBox, BeanProperty.create("selectedItem"),
painter, BeanProperty.create("areaEffects")));
effectsBinding.setConverter(new DisplayInfoArrayConverter(AreaEffect.class));
areaGroup.addBinding(effectsBinding);
Binding borderWidthBinding = (Bindings.createAutoBinding(READ,
borderWidthSlider, BeanProperty.create("value"),
painter, BeanProperty.create("borderWidth")));
borderWidthBinding.setConverter(PainterDemoUtils.SLIDER_TO_FLOAT);
areaGroup.addBinding(borderWidthBinding);
areaGroup.bind();
}
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:24,代码来源:PainterDemo.java
示例6: updateBaseBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
*
*/
@SuppressWarnings("unchecked")
private void updateBaseBindings() {
if (baseEnabled) {
baseGroup = new BindingGroup();
baseGroup.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ,
interpolationBox, BeanProperty.create("selectedItem"),
painter, BeanProperty.create("interpolation")));
baseGroup.addBinding(Bindings.createAutoBinding(READ,
visibleBox, BeanProperty.create("selected"),
painter, BeanProperty.create("visible")));
baseGroup.addBinding(Bindings.createAutoBinding(READ,
antialiasBox, BeanProperty.create("selected"),
painter, BeanProperty.create("antialiasing")));
Binding filterBinding = (Bindings.createAutoBinding(READ,
filterBox, BeanProperty.create("selectedItem"),
painter, BeanProperty.create("filters")));
filterBinding.setConverter(new DisplayInfoArrayConverter(BufferedImageOp.class));
baseGroup.addBinding(filterBinding);
baseGroup.bind();
}
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:26,代码来源:PainterDemo.java
示例7: updateAlignBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
*
*/
@SuppressWarnings("unchecked")
private void updateAlignBindings() {
if (alignEnabled) {
alignGroup = new BindingGroup();
alignGroup.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ,
horizontalAlignmentBox, BeanProperty.create("selectedItem"),
painter, BeanProperty.create("horizontalAlignment")));
alignGroup.addBinding(Bindings.createAutoBinding(READ,
verticalAlignmentBox, BeanProperty.create("selectedItem"),
painter, BeanProperty.create("verticalAlignment")));
alignGroup.addBinding(Bindings.createAutoBinding(READ,
fillHorizontal, BeanProperty.create("selected"),
painter, BeanProperty.create("fillHorizontal")));
alignGroup.addBinding(Bindings.createAutoBinding(READ,
fillVertical, BeanProperty.create("selected"),
painter, BeanProperty.create("fillVertical")));
Binding insetBinding = (Bindings.createAutoBinding(READ,
insetSlider, BeanProperty.create("value"),
painter, BeanProperty.create("insets")));
insetBinding.setConverter(PainterDemoUtils.SLIDER_TO_INSETS);
alignGroup.addBinding(insetBinding);
alignGroup.bind();
}
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:29,代码来源:PainterDemo.java
示例8: bind
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bind() {
Binding b = Bindings.createAutoBinding(READ,
speedSlider, BeanProperty.create("value"),
label, BeanProperty.create("delay"));
b.setConverter(new FactorConverter<Integer>(10));
b.bind();
Bindings.createAutoBinding(READ,
pointsSlider, BeanProperty.create("value"),
label, ELProperty.create("${busyPainter.points}")).bind();
Bindings.createAutoBinding(READ,
trailSlider, BeanProperty.create("value"),
label, ELProperty.create("${busyPainter.trailLength}")).bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:17,代码来源:BusyLabelDemo.java
示例9: bindLabelFor
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
* <p>
* Creates a binding for the specified {@code label} that tracks the {@code enabled} and {@code
* visible} states of its {@#link JLabel#setLabelFor(Component) labelFor} property. If
* no component is associated with the label or the associated component is removed, the label
* will retain its current enabled and visible states.
* </p>
* <p>
* If a component is supplied, then this method will also set the label-for association.
* </p>
*
* @param label
* the label to bind
* @param c
* the component to associate with the label; may be {@code null}
* @throws NullPointerException
* if {@code label} is {@code null}
*/
public static void bindLabelFor(JLabel label, Component c) {
if (label.getClientProperty(LABEL_FOR_BINDING_KEY) == null) {
BindingGroup bg = new BindingGroup();
//use the ternary operator to ensure that we always check valid properties
//we get the same effect using ${labelFor.enabled} but that results in log
//warnings when the labelFor property is null/empty.
bg.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ_WRITE, label,
ELProperty.create("${empty labelFor ? enabled : labelFor.enabled}"), label,
BeanProperty.create("enabled")));
bg.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ_WRITE, label,
ELProperty.create("${empty labelFor ? visible : labelFor.visible}"), label,
BeanProperty.create("visible")));
bg.bind();
label.putClientProperty(LABEL_FOR_BINDING_KEY, bg);
}
label.setLabelFor(c);
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:39,代码来源:LabelHandler.java
示例10: initDataBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
* Inits the data bindings.
*/
protected void initDataBindings() {
JTableBinding<Movie, List<Movie>, JTable> jTableBinding = SwingBindings.createJTableBinding(UpdateStrategy.READ_WRITE, moviesInSet, tableMovies);
//
BeanProperty<Movie, String> movieBeanProperty = BeanProperty.create("title");
jTableBinding.addColumnBinding(movieBeanProperty).setEditable(false); // $NON-NLS-1$
//
BeanProperty<Movie, String> movieBeanProperty_1 = BeanProperty.create("year");
jTableBinding.addColumnBinding(movieBeanProperty_1).setEditable(false); // $NON-NLS-1$
//
BeanProperty<Movie, Boolean> movieBeanProperty_2 = BeanProperty.create("watched");
jTableBinding.addColumnBinding(movieBeanProperty_2).setEditable(false).setColumnClass(Boolean.class); // $NON-NLS-1$
//
jTableBinding.setEditable(false);
jTableBinding.bind();
}
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:19,代码来源:MovieSetEditorDialog.java
示例11: initDataBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
protected void initDataBindings() {
BeanProperty<MovieSelectionModel, Integer> movieSelectionModelBeanProperty = BeanProperty.create("selectedMovie.dateAdded.date");
BeanProperty<JLabel, String> jLabelBeanProperty = BeanProperty.create("text");
AutoBinding<MovieSelectionModel, Integer, JLabel, String> autoBinding = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
movieSelectionModelBeanProperty, lblDateAdded, jLabelBeanProperty);
autoBinding.bind();
//
BeanProperty<MovieSelectionModel, Integer> movieSelectionModelBeanProperty_2 = BeanProperty.create("selectedMovie.dateAdded.day");
AutoBinding<MovieSelectionModel, Integer, JLabel, String> autoBinding_2 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
movieSelectionModelBeanProperty_2, lblDateAdded, jLabelBeanProperty);
autoBinding_2.bind();
//
BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_3 = BeanProperty.create("selectedMovie.dateAddedAsString");
AutoBinding<MovieSelectionModel, String, JLabel, String> autoBinding_3 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
movieSelectionModelBeanProperty_3, lblDateAdded, jLabelBeanProperty);
autoBinding_3.bind();
//
BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_13 = BeanProperty.create("selectedMovie.path");
AutoBinding<MovieSelectionModel, String, JLabel, String> autoBinding_19 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
movieSelectionModelBeanProperty_13, lblMoviePath, jLabelBeanProperty);
autoBinding_19.bind();
}
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:23,代码来源:MovieMediaFilesPanel.java
示例12: initDataBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
protected void initDataBindings() {
BeanProperty<Settings, List<String>> settingsBeanProperty_5 = BeanProperty.create("videoFileType");
JListBinding<String, Settings, JList> jListBinding_1 = SwingBindings.createJListBinding(UpdateStrategy.READ_WRITE, settings,
settingsBeanProperty_5, listVideoFiletypes);
jListBinding_1.bind();
//
BeanProperty<Settings, List<String>> settingsBeanProperty_6 = BeanProperty.create("subtitleFileType");
JListBinding<String, Settings, JList> jListBinding_2 = SwingBindings.createJListBinding(UpdateStrategy.READ_WRITE, settings,
settingsBeanProperty_6, listSubtitleFiletypes);
jListBinding_2.bind();
//
BeanProperty<Settings, List<String>> settingsBeanProperty_10 = BeanProperty.create("titlePrefix");
JListBinding<String, Settings, JList> jListBinding = SwingBindings.createJListBinding(UpdateStrategy.READ_WRITE, settings,
settingsBeanProperty_10, listSortPrefixes);
jListBinding.bind();
//
BeanProperty<Settings, List<String>> settingsBeanProperty_11 = BeanProperty.create("audioFileType");
JListBinding<String, Settings, JList> jListBinding_3 = SwingBindings.createJListBinding(UpdateStrategy.READ_WRITE, settings,
settingsBeanProperty_11, listAudioFiletypes);
jListBinding_3.bind();
}
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:22,代码来源:FileTypesSettingsPanel.java
示例13: creaWidget
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
private void creaWidget(Scene scene, Point point) {
this.setLayout(LayoutFactory.createHorizontalFlowLayout());
MyGradientLabelWidget gradientWidget = creaHeaderWidget(scene);
ImageWidget imageWidget = new ImageWidget(scene, ImageUtilities.loadImage(Costanti.ICONA_CONSTANT));
gradientWidget.addChild(imageWidget);
LabelWidget constantWidget = new LabelWidget(scene, "");
constantWidget.setVerticalAlignment(LabelWidget.VerticalAlignment.CENTER);
this.addChild(gradientWidget);
this.addChild(constantWidget);
this.setPreferredLocation(new Point(point.x - 1, point.y - 1));
settaBordoConstant();
Binding bindingConst = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, caratteristicheWidget, ELProperty.create("${costante}"), constantWidget, BeanProperty.create("label"));
bindingConst.bind();
this.setOpaque(true);
}
开发者ID:dbunibas,项目名称:spicy,代码行数:20,代码来源:ConstantWidget.java
示例14: initDataBindings
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
protected void initDataBindings()
{
BeanProperty<FindFociModel, List<String>> findFociModelBeanProperty = BeanProperty.create("imageList");
JComboBoxBinding<String, FindFociModel, JComboBox> jComboBinding = SwingBindings.createJComboBoxBinding(
UpdateStrategy.READ, model, findFociModelBeanProperty, comboImageList);
jComboBinding.bind();
//
BeanProperty<FindFociModel, String> findFociModelBeanProperty_1 = BeanProperty.create("selectedImage");
BeanProperty<JComboBox, Object> jComboBoxBeanProperty = BeanProperty.create("selectedItem");
AutoBinding<FindFociModel, String, JComboBox, Object> autoBinding = Bindings.createAutoBinding(
UpdateStrategy.READ_WRITE, model, findFociModelBeanProperty_1, comboImageList, jComboBoxBeanProperty);
autoBinding.bind();
//
BeanProperty<JButton, Boolean> jButtonBeanProperty = BeanProperty.create("enabled");
AutoBinding<FindFociModel, List<String>, JButton, Boolean> autoBinding_1 = Bindings.createAutoBinding(
UpdateStrategy.READ, model, findFociModelBeanProperty, btnRun, jButtonBeanProperty);
autoBinding_1.setConverter(new ValidImagesConverter());
autoBinding_1.bind();
}
开发者ID:aherbert,项目名称:GDSC,代码行数:21,代码来源:OptimiserView.java
示例15: bind
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bind() {
// list properties
// <snip> JXlist sorting
// enable auto-create RowSorter
list.setAutoCreateRowSorter(true);
list.setModel(Contributors.getContributorListModel());
//</snip>
// control combos
comparatorCombo.setModel(createComparators());
highlighterCombo.setModel(createRolloverHighlighters());
BindingGroup group = new BindingGroup();
group.addBinding(Bindings.createAutoBinding(READ,
rolloverEnabledBox, BeanProperty.create("selected"),
this, BeanProperty.create("rolloverEnabled")));
Binding comparatorBinding = Bindings.createAutoBinding(READ,
comparatorCombo, BeanProperty.create("selectedItem"),
this, BeanProperty.create("comparator"));
comparatorBinding.setConverter(new DisplayInfoConverter<Comparator<?>>());
group.addBinding(comparatorBinding);
Binding rolloverBinding = Bindings.createAutoBinding(READ,
highlighterCombo, BeanProperty.create("selectedItem"),
this, BeanProperty.create("rolloverHighlighter"));
rolloverBinding.setConverter(new DisplayInfoConverter<Highlighter>());
group.addBinding(rolloverBinding);
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:32,代码来源:XListDemo.java
示例16: SearchControl
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
public SearchControl() {
DemoUtils.setSnippet("MatchingTextHighlighter", extendedMarkerBox, painterBox);
initMatchMarkers();
BindingGroup group = new BindingGroup();
group.addBinding(Bindings.createAutoBinding(READ,
extendedMarkerBox, BeanProperty.create("selected"),
this, BeanProperty.create("extendedMarker")));
group.addBinding(Bindings.createAutoBinding(READ,
painterBox, BeanProperty.create("selected"),
this, BeanProperty.create("animatedPainter")));
group.addBinding(Bindings.createAutoBinding(READ,
this, BeanProperty.create("extendedMarker"),
painterBox, BeanProperty.create("enabled")));
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:16,代码来源:SearchDemo.java
示例17: bind
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
protected void bind() {
Bindings.createAutoBinding(READ, lineWrap, BeanProperty.create("selected"),
label, BeanProperty.create("lineWrap")).bind();
Bindings.createAutoBinding(READ, alignments, BeanProperty.create("selectedItem"),
label, BeanProperty.create("textAlignment")).bind();
//TODO build a converter to handle this via BeanBinding
rotate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
label.setTextRotation((label.getTextRotation() + Math.PI / 16) % (2 * Math.PI));
}
});
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:16,代码来源:XLabelDemo.java
示例18: MonthViewDemoControl
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public MonthViewDemoControl() {
DemoUtils.setSnippet("Custom CalendarRenderingHandler", calendarBox);
// <snip> Custom CalendarHeaderHandler
// configure the comboBox
customHeaderBox.setModel(createHeaderInfos());
customHeaderBox.setRenderer(new DefaultListRenderer(
DisplayValues.DISPLAY_INFO_DESCRIPTION));
// </snip>
DemoUtils.setSnippet("Custom CalendarHeaderHandler", customHeaderBox, zoomableBox);
BindingGroup group = new BindingGroup();
group.addBinding(Bindings.createAutoBinding(READ_WRITE,
calendarBox, BeanProperty.create("selected"),
this, BeanProperty.create("calendarVisible")));
group.addBinding(Bindings.createAutoBinding(READ,
zoomableBox, BeanProperty.create("selected"),
monthView, BeanProperty.create("zoomable")));
// <snip> Custom CalendarHeaderHandler
// bind the combo box
group.addBinding(Bindings.createAutoBinding(READ,
monthView, BeanProperty.create("zoomable"),
customHeaderBox, BeanProperty.create("enabled")
));
Binding handlerBinding = Bindings.createAutoBinding(READ,
customHeaderBox, BeanProperty.create("selectedItem"),
this, BeanProperty.create("calendarHeaderHandler"));
handlerBinding.setConverter(new DisplayInfoConverter<CalendarHeaderHandler>());
// </snip>
group.addBinding(handlerBinding);
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:38,代码来源:MonthViewExtDemo.java
示例19: bind
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bind() {
// set actions
prevButton.setAction(DemoUtils.getAction(this, "previousCard"));
nextButton.setAction(DemoUtils.getAction(this, "nextCard"));
// re-set action-independent Icons
applyNavigationDefaults();
visibleBox.setAction(DemoUtils.getAction(this, "toggleNavigatorVisible"));
DefaultListRenderer renderer = new DefaultListRenderer(DisplayValues.DISPLAY_INFO_DESCRIPTION);
fontChooserCombo.setRenderer(renderer);
backgroundChooserCombo.setRenderer(renderer);
BindingGroup group = new BindingGroup();
// <snip> JXTitledPanel configure title properties
// edit title text
group.addBinding(Bindings.createAutoBinding(UpdateStrategy.READ,
titleField, BeanProperty.create("text"),
titledPanel, BeanProperty.create("title")));
// </snip>
Binding fontBinding = Bindings.createAutoBinding(UpdateStrategy.READ,
fontChooserCombo, BeanProperty.create("selectedItem"),
titledPanel, BeanProperty.create("titleFont"));
fontBinding.setConverter(new DisplayInfoConverter<Font>());
group.addBinding(fontBinding);
Binding backgroundBinding = Bindings.createAutoBinding(UpdateStrategy.READ,
backgroundChooserCombo, BeanProperty.create("selectedItem"),
titledPanel, BeanProperty.create("titlePainter"));
backgroundBinding.setConverter(new DisplayInfoConverter<Painter>());
group.addBinding(backgroundBinding);
group.bind();
updateUIProperties();
installUIListener();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:38,代码来源:TitledPanelDemo.java
示例20: bindInversCollapsed
import org.jdesktop.beansbinding.BeanProperty; //导入依赖的package包/类
/**
* @param property
*/
private void bindInversCollapsed(String property, JComponent... components ) {
BindingGroup group = new BindingGroup();
for (JComponent comp : components) {
group.addBinding(Bindings.createAutoBinding(READ,
painterControl, ELProperty.create("${!" + property + "}"),
comp, BeanProperty.create("collapsed")));
}
group.bind();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:13,代码来源:PainterDemo.java
注:本文中的org.jdesktop.beansbinding.BeanProperty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论