当前位置: 首页>>代码示例>>Java>>正文


Java AutoBinding.setConverter方法代码示例

本文整理汇总了Java中org.jdesktop.beansbinding.AutoBinding.setConverter方法的典型用法代码示例。如果您正苦于以下问题:Java AutoBinding.setConverter方法的具体用法?Java AutoBinding.setConverter怎么用?Java AutoBinding.setConverter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jdesktop.beansbinding.AutoBinding的用法示例。


在下文中一共展示了AutoBinding.setConverter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initDataBindings

import org.jdesktop.beansbinding.AutoBinding; //导入方法依赖的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

示例2: initDataBindings

import org.jdesktop.beansbinding.AutoBinding; //导入方法依赖的package包/类
protected void initDataBindings() {
  BeanProperty<TvShowSelectionModel, String> tvShowSelectionModelBeanProperty = BeanProperty.create("selectedTvShow.title");
  BeanProperty<JLabel, String> jLabelBeanProperty = BeanProperty.create("text");
  AutoBinding<TvShowSelectionModel, String, JLabel, String> autoBinding = Bindings.createAutoBinding(UpdateStrategy.READ, tvShowSelectionModel,
      tvShowSelectionModelBeanProperty, lblTvShowName, jLabelBeanProperty);
  autoBinding.bind();
  //
  BeanProperty<TvShowSelectionModel, String> tvShowSelectionModelBeanProperty_1 = BeanProperty.create("selectedTvShow.plot");
  BeanProperty<JTextPane, String> jTextPaneBeanProperty = BeanProperty.create("text");
  AutoBinding<TvShowSelectionModel, String, JTextPane, String> autoBinding_1 = Bindings.createAutoBinding(UpdateStrategy.READ, tvShowSelectionModel,
      tvShowSelectionModelBeanProperty_1, tpOverview, jTextPaneBeanProperty);
  autoBinding_1.bind();
  //
  BeanProperty<TvShowSelectionModel, Float> tvShowSelectionModelBeanProperty_2 = BeanProperty.create("selectedTvShow.rating");
  BeanProperty<StarRater, Float> starRaterBeanProperty = BeanProperty.create("rating");
  AutoBinding<TvShowSelectionModel, Float, StarRater, Float> autoBinding_2 = Bindings.createAutoBinding(UpdateStrategy.READ, tvShowSelectionModel,
      tvShowSelectionModelBeanProperty_2, panelRatingStars, starRaterBeanProperty);
  autoBinding_2.bind();
  //
  AutoBinding<TvShowSelectionModel, Float, JLabel, String> autoBinding_3 = Bindings.createAutoBinding(UpdateStrategy.READ, tvShowSelectionModel,
      tvShowSelectionModelBeanProperty_2, lblRating, jLabelBeanProperty);
  autoBinding_3.bind();
  //
  BeanProperty<TvShowSelectionModel, Certification> tvShowSelectionModelBeanProperty_8 = BeanProperty.create("selectedTvShow.certification");
  BeanProperty<JLabel, Icon> jLabelBeanProperty_2 = BeanProperty.create("icon");
  AutoBinding<TvShowSelectionModel, Certification, JLabel, Icon> autoBinding_9 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowSelectionModel, tvShowSelectionModelBeanProperty_8, lblCertificationImage, jLabelBeanProperty_2);
  autoBinding_9.setConverter(new CertificationImageConverter());
  autoBinding_9.bind();
  //
  BeanProperty<TvShowSelectionModel, Integer> tvShowSelectionModelBeanProperty_3 = BeanProperty.create("selectedTvShow.votes");
  AutoBinding<TvShowSelectionModel, Integer, JLabel, String> autoBinding_4 = Bindings.createAutoBinding(UpdateStrategy.READ, tvShowSelectionModel,
      tvShowSelectionModelBeanProperty_3, lblVoteCount, jLabelBeanProperty);
  autoBinding_4.setConverter(new VoteCountConverter());
  autoBinding_4.bind();
}
 
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:37,代码来源:TvShowInformationPanel.java

示例3: initDataBindings

import org.jdesktop.beansbinding.AutoBinding; //导入方法依赖的package包/类
protected void initDataBindings() {
  BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty = BeanProperty.create("selectedMovie.titleForUi");
  BeanProperty<JLabel, String> jLabelBeanProperty = BeanProperty.create("text");
  AutoBinding<MovieSelectionModel, String, JLabel, String> autoBinding = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty, lblMovieName, jLabelBeanProperty);
  autoBinding.bind();
  //
  BeanProperty<MovieSelectionModel, Float> movieSelectionModelBeanProperty_1 = BeanProperty.create("selectedMovie.rating");
  AutoBinding<MovieSelectionModel, Float, JLabel, String> autoBinding_1 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_1, lblRating, jLabelBeanProperty);
  autoBinding_1.bind();
  //
  BeanProperty<StarRater, Float> starRaterBeanProperty = BeanProperty.create("rating");
  AutoBinding<MovieSelectionModel, Float, StarRater, Float> autoBinding_3 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_1, panelRatingStars, starRaterBeanProperty);
  autoBinding_3.bind();
  //
  BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_14 = BeanProperty.create("selectedMovie.plot");
  BeanProperty<JTextPane, String> jTextPaneBeanProperty = BeanProperty.create("text");
  AutoBinding<MovieSelectionModel, String, JTextPane, String> autoBinding_15 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_14, tpOverview, jTextPaneBeanProperty);
  autoBinding_15.bind();
  //
  BeanProperty<MovieSelectionModel, Integer> movieSelectionModelBeanProperty_2 = BeanProperty.create("selectedMovie.votes");
  AutoBinding<MovieSelectionModel, Integer, JLabel, String> autoBinding_2 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_2, lblVoteCount, jLabelBeanProperty);
  autoBinding_2.setConverter(new VoteCountConverter());
  autoBinding_2.bind();
  //
  BeanProperty<MovieSelectionModel, Certification> movieSelectionModelBeanProperty_6 = BeanProperty.create("selectedMovie.certification");
  BeanProperty<JLabel, Icon> jLabelBeanProperty_2 = BeanProperty.create("icon");
  AutoBinding<MovieSelectionModel, Certification, JLabel, Icon> autoBinding_7 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_6, lblCertificationImage, jLabelBeanProperty_2);
  autoBinding_7.setConverter(new CertificationImageConverter());
  autoBinding_7.bind();
  //
  BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_3 = BeanProperty.create("selectedMovie.tagline");
  AutoBinding<MovieSelectionModel, String, JLabel, String> autoBinding_4 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_3, lblTagline, jLabelBeanProperty);
  autoBinding_4.bind();
  //
  BeanProperty<MovieSelectionModel, Boolean> movieSelectionModelBeanProperty_7 = BeanProperty.create("selectedMovie.watched");
  AutoBinding<MovieSelectionModel, Boolean, JLabel, Icon> autoBinding_8 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_7, lblWatchedImage, jLabelBeanProperty_2);
  autoBinding_8.setConverter(new WatchedIconConverter2());
  autoBinding_8.bind();
  //
  BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_9 = BeanProperty.create("selectedMovie.mediaInfoVideoFormat");
  AutoBinding<MovieSelectionModel, String, JLabel, Icon> autoBinding_11 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_9, lblMediaLogoResolution, jLabelBeanProperty_2);
  autoBinding_11.setConverter(new MediaInfoVideoFormatConverter());
  autoBinding_11.bind();
  //
  BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_10 = BeanProperty.create("selectedMovie.mediaInfoVideoCodec");
  AutoBinding<MovieSelectionModel, String, JLabel, Icon> autoBinding_12 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_10, lblMediaLogoVideoCodec, jLabelBeanProperty_2);
  autoBinding_12.setConverter(new MediaInfoVideoCodecConverter());
  autoBinding_12.bind();
  //
  BeanProperty<MovieSelectionModel, String> movieSelectionModelBeanProperty_11 = BeanProperty
      .create("selectedMovie.mediaInfoAudioCodecAndChannels");
  AutoBinding<MovieSelectionModel, String, JLabel, Icon> autoBinding_13 = Bindings.createAutoBinding(UpdateStrategy.READ, movieSelectionModel,
      movieSelectionModelBeanProperty_11, lblMediaLogoAudio, jLabelBeanProperty_2);
  autoBinding_13.setConverter(new MediaInfoAudioCodecConverter());
  autoBinding_13.bind();
}
 
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:67,代码来源:MovieInformationPanel.java

示例4: initDataBindings

import org.jdesktop.beansbinding.AutoBinding; //导入方法依赖的package包/类
protected void initDataBindings() {
  BeanProperty<TvShowEpisodeSelectionModel, String> tvShowEpisodeSelectionModelBeanProperty = BeanProperty
      .create("selectedTvShowEpisode.tvShow.title");
  BeanProperty<JLabel, String> jLabelBeanProperty = BeanProperty.create("text");
  AutoBinding<TvShowEpisodeSelectionModel, String, JLabel, String> autoBinding = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty, lblTvShowName, jLabelBeanProperty);
  autoBinding.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, String> tvShowEpisodeSelectionModelBeanProperty_1 = BeanProperty
      .create("selectedTvShowEpisode.titleForUi");
  AutoBinding<TvShowEpisodeSelectionModel, String, JLabel, String> autoBinding_1 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_1, lblEpisodeTitle, jLabelBeanProperty);
  autoBinding_1.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, String> tvShowEpisodeSelectionModelBeanProperty_3 = BeanProperty.create("selectedTvShowEpisode.plot");
  BeanProperty<JTextPane, String> jTextPaneBeanProperty = BeanProperty.create("text");
  AutoBinding<TvShowEpisodeSelectionModel, String, JTextPane, String> autoBinding_3 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_3, tpOverview, jTextPaneBeanProperty);
  autoBinding_3.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, Float> tvShowEpisodeSelectionModelBeanProperty_4 = BeanProperty.create("selectedTvShowEpisode.rating");
  BeanProperty<StarRater, Float> starRaterBeanProperty = BeanProperty.create("rating");
  AutoBinding<TvShowEpisodeSelectionModel, Float, StarRater, Float> autoBinding_4 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_4, panelRatingStars, starRaterBeanProperty);
  autoBinding_4.bind();
  //
  AutoBinding<TvShowEpisodeSelectionModel, Float, JLabel, String> autoBinding_5 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_4, lblRating, jLabelBeanProperty);
  autoBinding_5.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, String> tvShowEpisodeSelectionModelBeanProperty_6 = BeanProperty
      .create("selectedTvShowEpisode.mediaInfoVideoFormat");
  BeanProperty<JLabel, Icon> jLabelBeanProperty_1 = BeanProperty.create("icon");
  AutoBinding<TvShowEpisodeSelectionModel, String, JLabel, Icon> autoBinding_7 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_6, lblMediaLogoResolution, jLabelBeanProperty_1);
  autoBinding_7.setConverter(new MediaInfoVideoFormatConverter());
  autoBinding_7.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, String> tvShowEpisodeSelectionModelBeanProperty_7 = BeanProperty
      .create("selectedTvShowEpisode.mediaInfoVideoCodec");
  AutoBinding<TvShowEpisodeSelectionModel, String, JLabel, Icon> autoBinding_8 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_7, lblMediaLogoVideoCodec, jLabelBeanProperty_1);
  autoBinding_8.setConverter(new MediaInfoVideoCodecConverter());
  autoBinding_8.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, String> tvShowEpisodeSelectionModelBeanProperty_8 = BeanProperty
      .create("selectedTvShowEpisode.mediaInfoAudioCodecAndChannels");
  AutoBinding<TvShowEpisodeSelectionModel, String, JLabel, Icon> autoBinding_9 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_8, lblMediaLogoAudio, jLabelBeanProperty_1);
  autoBinding_9.setConverter(new MediaInfoAudioCodecConverter());
  autoBinding_9.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, Certification> tvShowEpisodeSelectionModelBeanProperty_9 = BeanProperty
      .create("selectedTvShowEpisode.tvShow.certification");
  AutoBinding<TvShowEpisodeSelectionModel, Certification, JLabel, Icon> autoBinding_10 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_9, lblCertificationImage, jLabelBeanProperty_1);
  autoBinding_10.setConverter(new CertificationImageConverter());
  autoBinding_10.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, Boolean> tvShowEpisodeSelectionModelBeanProperty_10 = BeanProperty
      .create("selectedTvShowEpisode.watched");
  AutoBinding<TvShowEpisodeSelectionModel, Boolean, JLabel, Icon> autoBinding_11 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_10, lblWatched, jLabelBeanProperty_1);
  autoBinding_11.setConverter(new WatchedIconConverter());
  autoBinding_11.bind();
  //
  BeanProperty<TvShowEpisodeSelectionModel, Integer> tvShowEpisodeSelectionModelBeanProperty_2 = BeanProperty.create("selectedTvShowEpisode.votes");
  AutoBinding<TvShowEpisodeSelectionModel, Integer, JLabel, String> autoBinding_2 = Bindings.createAutoBinding(UpdateStrategy.READ,
      tvShowEpisodeSelectionModel, tvShowEpisodeSelectionModelBeanProperty_2, lblVoteCount, jLabelBeanProperty);
  autoBinding_2.setConverter(new VoteCountConverter());
  autoBinding_2.bind();
}
 
开发者ID:tinyMediaManager,项目名称:tinyMediaManager,代码行数:73,代码来源:TvShowEpisodeInformationPanel.java


注:本文中的org.jdesktop.beansbinding.AutoBinding.setConverter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。