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

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

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

JSlider.setOrientation介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

sldVolume.setOrientation(javax.swing.JSlider.VERTICAL);
sldVolume.setPaintTicks(true);
sldVolume.setValue(100);

代码示例来源:origin: fossasia/neurolab-desktop

slider.setOrientation(JSlider.VERTICAL);
slider.addChangeListener(new ChangeListener() {

代码示例来源:origin: com.googlecode.gstreamer-java/gstreamer-java

public PopupVolumeButton(BoundedRangeModel model) {
  /*
   * Construct the popup for the volume slider
   */
  volumePanel = new JPanel();
  volumePanel.setLayout(new BoxLayout(volumePanel, BoxLayout.Y_AXIS));
  
  volumeSlider = new JSlider(model);
  volumeSlider.addChangeListener(volumeChanged);
  volumeSlider.setOrientation(SwingConstants.VERTICAL);
  volumePanel.add(new JLabel(highVolumeIcon));
  volumeSlider.setAlignmentX(0.25f);
  volumePanel.add(volumeSlider);
  volumePanel.add(new JLabel(lowVolumeIcon));
  volumePanel.validate();
  setAction(volumeAction);
}
public PopupVolumeButton(final PlayBin2 playbin) {

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

slider.setOrientation(JSlider.VERTICAL);
slider.addChangeListener(new ChangeListener()
slider.setOrientation(JSlider.VERTICAL);
slider.addChangeListener(new ChangeListener()
slider.setOrientation(JSlider.VERTICAL);
slider.addChangeListener(new ChangeListener()

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

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
private void initComponents() {//GEN-BEGIN:initComponents
  brightnessSlider = new javax.swing.JSlider();
  setLayout(new java.awt.BorderLayout());
  brightnessSlider.setMajorTickSpacing(50);
  brightnessSlider.setOrientation(javax.swing.JSlider.VERTICAL);
  brightnessSlider.setPaintTicks(true);
  add(brightnessSlider, java.awt.BorderLayout.EAST);
}//GEN-END:initComponents

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

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
private void initComponents() {//GEN-BEGIN:initComponents
  brightnessSlider = new javax.swing.JSlider();
  setLayout(new java.awt.BorderLayout());
  brightnessSlider.setMajorTickSpacing(50);
  brightnessSlider.setOrientation(javax.swing.JSlider.VERTICAL);
  brightnessSlider.setPaintTicks(true);
  add(brightnessSlider, java.awt.BorderLayout.EAST);
}//GEN-END:initComponents

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
private void initComponents() {//GEN-BEGIN:initComponents
  brightnessSlider = new javax.swing.JSlider();
  setLayout(new java.awt.BorderLayout());
  brightnessSlider.setMajorTickSpacing(50);
  brightnessSlider.setOrientation(javax.swing.JSlider.VERTICAL);
  brightnessSlider.setPaintTicks(true);
  add(brightnessSlider, java.awt.BorderLayout.EAST);
}//GEN-END:initComponents

代码示例来源:origin: com.hazelcast.simulator/visualiser

private void initSliders() {
  mainHorizontalSlider.setMinimum(MAIN_SLIDER_MINIMUM);
  fineHorizontalSlider.setMinimum(FINE_SLIDER_MINIMUM);
  verticalSlider.setMinimum(VERTICAL_SLIDER_MINIMUM);
  verticalSlider.setOrientation(JSlider.VERTICAL);
}

代码示例来源:origin: com.hazelcast.simulator/visualizer

private void initSliders() {
  mainHorizontalSlider.setMinimum(MAIN_SLIDER_MINIMUM);
  fineHorizontalSlider.setMinimum(FINE_SLIDER_MINIMUM);
  verticalSlider.setMinimum(VERTICAL_SLIDER_MINIMUM);
  verticalSlider.setOrientation(JSlider.VERTICAL);
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  brightnessSlider = new javax.swing.JSlider();
  setBorder(javax.swing.BorderFactory.createEmptyBorder(4, 6, 6, 6));
  setLayout(new java.awt.BorderLayout());
  brightnessSlider.setMajorTickSpacing(50);
  brightnessSlider.setOrientation(javax.swing.JSlider.VERTICAL);
  brightnessSlider.setPaintTicks(true);
  add(brightnessSlider, java.awt.BorderLayout.EAST);
}// </editor-fold>//GEN-END:initComponents

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

private JPanel createSliderChooser(ColorSpace sys, boolean vertical) {
  JPanel p = new JPanel(new GridLayout(vertical ? 1 : 0, vertical ? 0 : 1));
  DefaultColorSliderModel m = new DefaultColorSliderModel(sys);
  models.add(m);
  if (!vertical) {
    p.add(new JLabel(
        "<html>" + ColorUtil.getName(sys)), BorderLayout.NORTH);
  }
  m.addChangeListener(handler);
  for (int i = 0;
      i < m.getComponentCount();
      i++) {
    JSlider s = new JSlider(JSlider.HORIZONTAL);
    s.setMajorTickSpacing(50);
    s.setPaintTicks(true);
    s.setOrientation(vertical ? JSlider.VERTICAL : JSlider.HORIZONTAL);
    m.configureSlider(i, s);
    p.add(s);
  }
  return p;
}

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

slider.setOrientation(SwingConstants.VERTICAL);
slider.setValue(0);
slider.setBounds(131, 60, 53, 136);

代码示例来源: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: de.dfki.mary/marytts-client

slPower.setOrientation(javax.swing.JSlider.VERTICAL);
slPower.setValue(0);
slPower.addChangeListener(new javax.swing.event.ChangeListener() {

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

heightSlider.setOrientation(JSlider.VERTICAL);
heightSlider.addChangeListener(new ChangeListener() {
  @Override

代码示例来源:origin: pentaho/pentaho-reporting

selectedValueSlider.setOrientation( JSlider.VERTICAL );
selectedValueSlider.addChangeListener( new SliderChangeHandler() );

代码示例来源:origin: uk.co.caprica/vlcj

volumeSlider.setOrientation(JSlider.HORIZONTAL);
volumeSlider.setMinimum(LibVlcConst.MIN_VOLUME);
volumeSlider.setMaximum(LibVlcConst.MAX_VOLUME);

代码示例来源:origin: uk.co.caprica/vlcj

contrastSlider.setOrientation(JSlider.HORIZONTAL);
contrastSlider.setMinimum(Math.round(LibVlcConst.MIN_CONTRAST * 100.0f));
contrastSlider.setMaximum(Math.round(LibVlcConst.MAX_CONTRAST * 100.0f));
brightnessSlider.setOrientation(JSlider.HORIZONTAL);
brightnessSlider.setMinimum(Math.round(LibVlcConst.MIN_BRIGHTNESS * 100.0f));
brightnessSlider.setMaximum(Math.round(LibVlcConst.MAX_BRIGHTNESS * 100.0f));
hueSlider.setOrientation(JSlider.HORIZONTAL);
hueSlider.setMinimum(Math.round(LibVlcConst.MIN_HUE * 100.0f));
hueSlider.setMaximum(Math.round(LibVlcConst.MAX_HUE * 100.0f));
saturationSlider.setOrientation(JSlider.HORIZONTAL);
saturationSlider.setMinimum(Math.round(LibVlcConst.MIN_SATURATION * 100.0f));
saturationSlider.setMaximum(Math.round(LibVlcConst.MAX_SATURATION * 100.0f));
gammaSlider.setOrientation(JSlider.HORIZONTAL);
gammaSlider.setMinimum(Math.round(LibVlcConst.MIN_GAMMA * 100.0f));
gammaSlider.setMaximum(Math.round(LibVlcConst.MAX_GAMMA * 100.0f));

代码示例来源:origin: org.fudaa.framework.ebli/ebli-3d

slIntensite_.setToolTipText(EbliResource.EBLI.getString("Intensit"));
slIntensite_.setPaintLabels(true);
slIntensite_.setOrientation(SwingConstants.HORIZONTAL);
slIntensite_.setMajorTickSpacing(10);
setLayout(new BuGridLayout(2, 3, 3, false, false));

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

comp.setOrientation(orientation);

相关文章

JSlider类方法