javax.swing.JSlider.setInverted()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中javax.swing.JSlider.setInverted()方法的一些代码示例,展示了JSlider.setInverted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setInverted()方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setInverted

JSlider.setInverted介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

// to please Andrew :)
JLabel fooLabel = new JLabel(new ImageIcon(ImageIO.read(
    new URL("http://pscode.org/media/stromlo2.jpg"))));
final JLayer<JLabel> layer = new JLayer<JLabel>(fooLabel);
final JLabel player = new JLabel(new CursorIcon(30));
// to please myself (never-ever use a null layout :)
layer.getGlassPane().setLayout(new DragLayout());
layer.getGlassPane().add(player);
layer.getGlassPane().setVisible(true);
final JSlider horizontal = new JSlider(0, fooLabel.getPreferredSize().width, 0);
final JSlider vertical = new JSlider(JSlider.VERTICAL, 0, fooLabel.getPreferredSize().height, 0);
vertical.setInverted(true);
ChangeListener l = new ChangeListener() {
 @Override
 public void stateChanged(ChangeEvent e) {
   player.setLocation(horizontal.getValue(), vertical.getValue());
   layer.revalidate();
 }
};
horizontal.addChangeListener(l);
vertical.addChangeListener(l);

代码示例来源:origin: com.bbossgroups/bboss-htmlparser

mSpeedSlider.setToolTipText ("Set inter-image delay.");
mSpeedSlider.setValue (500);
mSpeedSlider.setInverted (true);
mPowerBar.add (mSpeedSlider);

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-mobility-svgcore

slider.setInverted(true);
sliderWrapper = new ComponentGroup.SliderWrapper(slider) {
  @Override

代码示例来源:origin: biojava/biojava

slider.setInverted(false);
slider.setPaintTicks(true);

代码示例来源:origin: Mine-and-blade-admin/Battlegear2

y2slider.setInverted(true);
y2slider.setMajorTickSpacing(1);
y2slider.setMinorTickSpacing(1);

代码示例来源:origin: biojava/biojava

residueSizeSlider = new JSlider(JSlider.HORIZONTAL,
    RES_MIN, RES_MAX, RES_INIT);
residueSizeSlider.setInverted(true);

代码示例来源:origin: robo-code/robocode

public void setup(ISettingsManager settingsManager, BattleProperties battleProperties) {
  this.settingsManager = settingsManager;
  this.battleProperties = battleProperties;
  EventHandler eventHandler = new EventHandler();
  battlefieldWidthSlider = createBattlefieldSizeSlider();
  battlefieldWidthSlider.setOrientation(SwingConstants.HORIZONTAL);
  battlefieldHeightSlider = createBattlefieldSizeSlider();
  battlefieldHeightSlider.setOrientation(SwingConstants.VERTICAL);
  battlefieldHeightSlider.setInverted(true);
  battlefieldSizeLabel = new BattlefieldSizeLabel();
  battlefieldSizeLabel.setHorizontalAlignment(SwingConstants.CENTER);
  battlefieldSizeLabel.setMinimumSize(new Dimension(50, 50));
  battlefieldSizeLabel.setMaximumSize(new Dimension(500, 500));
  battlefieldWidthSlider.addChangeListener(eventHandler);
  battlefieldHeightSlider.addChangeListener(eventHandler);
  JPanel rulesPanel = createRulesPanel();
  rulesPanel.addAncestorListener(eventHandler);
  restoreDefaultsButton.addActionListener(eventHandler);
  setLayout(new BorderLayout());
  
  add(rulesPanel, BorderLayout.WEST);
  add(restoreDefaultsButton, BorderLayout.SOUTH);
  add(createBattlefieldSizePanel(), BorderLayout.CENTER);
}

代码示例来源:origin: lbalazscs/Pixelitor

slider.setValue(0);
Option option = getSelectedOption();
slider.setInverted(mode==HUE);
int max = option.getMaximum();
slider.setMaximum(max);

代码示例来源:origin: com.github.insubstantial/substance

saturationSlider.setOpaque(false);
saturationSlider.setInverted(true);
saturationSlider.setPaintLabels(true);
saturationSlider.addChangeListener(this);

代码示例来源:origin: org.java.net.substance/substance

saturationSlider.setOpaque(false);
saturationSlider.setInverted(true);
saturationSlider.setPaintLabels(true);
saturationSlider.addChangeListener(this);

代码示例来源:origin: org.xworker/xworker_core

comp.setInverted(inverted);

相关文章

JSlider类方法