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

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

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

JSlider.setVisible介绍

暂无

代码示例

代码示例来源:origin: robward-scisys/sldeditor

/**
 * Sets the field visible.
 *
 * @param visible the new visible state
 */
@Override
public void setVisible(boolean visible) {
  if (slider != null) {
    slider.setVisible(visible);
  }
}

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

public void setSliderVisible( final boolean b ) {
 valueSlider.setVisible( b );
}

代码示例来源:origin: de.dfki.mary/marytts-client

public void verifyPowerVisible() {
  lMaxPower.setVisible(showPower);
  lMinPower.setVisible(showPower);
  slPower.setVisible(showPower);
}

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

/** This shows or hides the alpha controls.
 * <P>Note the alpha spinner live inside the "expert controls", so if <code>setExpertControlsVisible(false)</code>
 * has been called, then this method does not affect that spinner.
 * However, the opacity slider is <i>not</i> affected by the visibility of the export controls.
 * @param b
 */
public void setOpacityVisible(boolean b) {
  opacityLabel.setVisible(b);
  opacitySlider.setVisible(b);
  alpha.label.setVisible(b);
  alpha.spinner.setVisible(b);
}

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

public void setVisible(boolean b) {
    boolean radioButtonsAllowed = true;
    Boolean z = (Boolean)getClientProperty(MODE_CONTROLS_VISIBLE_PROPERTY);
    if(z!=null) radioButtonsAllowed = z.booleanValue();
    
    radioButton.setVisible(b && radioButtonsAllowed);
    if(slider!=null)
      slider.setVisible(b);
    if(spinner!=null)
      spinner.setVisible(b);
    label.setVisible(b);
  }
}

代码示例来源:origin: omegat-org/omegat

private static void removeTransparencySlider(JColorChooser jc) throws Exception {
  AbstractColorChooserPanel[] colorPanels = jc.getChooserPanels();
  for (int i = 1; i < colorPanels.length; i++) {
    AbstractColorChooserPanel cp = colorPanels[i];
    Field f = cp.getClass().getDeclaredField("panel");
    f.setAccessible(true);
    Object colorPanel = f.get(cp);
    Field f2 = colorPanel.getClass().getDeclaredField("spinners");
    f2.setAccessible(true);
    Object spinners = f2.get(colorPanel);
    Object transpSlispinner = Array.get(spinners, 3);
    if (i == colorPanels.length - 1) {
      transpSlispinner = Array.get(spinners, 4);
    }
    Field f3 = transpSlispinner.getClass().getDeclaredField("slider");
    f3.setAccessible(true);
    JSlider slider = (JSlider) f3.get(transpSlispinner);
    slider.setEnabled(false);
    slider.setVisible(false);
    Field f4 = transpSlispinner.getClass().getDeclaredField("spinner");
    f4.setAccessible(true);
    JSpinner spinner = (JSpinner) f4.get(transpSlispinner);
    spinner.setEnabled(false);
    spinner.setVisible(false);
    Field f5 = transpSlispinner.getClass().getDeclaredField("label");
    f5.setAccessible(true);
    JLabel label = (JLabel) f5.get(transpSlispinner);
    label.setVisible(false);
  }
}

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

JSlider slider = (JSlider) f3.get(transpSlispinner);
slider.setEnabled(false);
slider.setVisible(false);
Field f4 = transpSlispinner.getClass().getDeclaredField("spinner");
f4.setAccessible(true);

代码示例来源:origin: bastienjalbert/topguw

public void actionPerformed(ActionEvent e) {
    if (JOptionPane.showConfirmDialog(null, "Do you want to try scan for"
        + " GSM tower[YES] or sniff a frequency[NO].", "Scan or snif",
        JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE)
        == JOptionPane.YES_OPTION) {
      lblGain.setVisible(true);
      sliderGainKal.setVisible(true);
      mnGsmBand.setVisible(true);
      btnGo.setVisible(true);
    } else {
      String fr = JOptionPane.showInputDialog(frmTopguw,
          "Which frequency do you want to snif (in Hz) ?");
      if (General.isInteger(fr) && fr.length() == 9) {
        frequency = fr;
        lblGain.setVisible(true);
        sliderGainKal.setVisible(true);
        mnGsmBand.setVisible(true);
        btnGo.setVisible(true);
        addLine("Frequency " + fr + " is correctly setup.");
      } else {
        addLine("Specified frequency seems not to be valid.");
      }
    }
  }
}

代码示例来源:origin: org.jxmapviewer/jxmapviewer2

/**
 * Sets if the zoom slider should be visible
 * @param zoomSliderVisible the new value of the zoomSliderVisible property
 */
public void setZoomSliderVisible(boolean zoomSliderVisible)
{
  boolean old = this.isZoomSliderVisible();
  this.zoomSliderVisible = zoomSliderVisible;
  zoomSlider.setVisible(zoomSliderVisible);
  firePropertyChange("zoomSliderVisible", old, this.isZoomSliderVisible());
}

代码示例来源:origin: org.swinglabs/swingx-ws

/**
 * Sets if the zoom slider should be visible
 * @param zoomSliderVisible the new value of the zoomSliderVisible property
 */
public void setZoomSliderVisible(boolean zoomSliderVisible) {
  boolean old = this.isZoomSliderVisible();
  this.zoomSliderVisible = zoomSliderVisible;
  zoomSlider.setVisible(zoomSliderVisible);
  firePropertyChange("zoomSliderVisible",old,this.isZoomSliderVisible());
}

代码示例来源:origin: org.jdesktop.swingx/jxmapviewer2

/**
 * Sets if the zoom slider should be visible
 * @param zoomSliderVisible the new value of the zoomSliderVisible property
 */
public void setZoomSliderVisible(boolean zoomSliderVisible)
{
  boolean old = this.isZoomSliderVisible();
  this.zoomSliderVisible = zoomSliderVisible;
  zoomSlider.setVisible(zoomSliderVisible);
  firePropertyChange("zoomSliderVisible", old, this.isZoomSliderVisible());
}

代码示例来源:origin: msteiger/jxmapviewer2

/**
 * Sets if the zoom slider should be visible
 * @param zoomSliderVisible the new value of the zoomSliderVisible property
 */
public void setZoomSliderVisible(boolean zoomSliderVisible)
{
  boolean old = this.isZoomSliderVisible();
  this.zoomSliderVisible = zoomSliderVisible;
  zoomSlider.setVisible(zoomSliderVisible);
  firePropertyChange("zoomSliderVisible", old, this.isZoomSliderVisible());
}

代码示例来源:origin: sc.fiji/Color_Inspector_3D

label0.setVisible(false);
jTextField.setVisible(false);
slider0.setVisible(false);
button.setVisible(false);
qMode = 0;
label0.setVisible(true);
jTextField.setVisible(false);
slider0.setVisible(true);
button.setVisible(false);
qMode = 0;
  label0.setText(stringCells);
  label0.setVisible(isSlider0);
  slider0.setVisible(isSlider0);
  slider0.setVisible(false);
  label0.setVisible(false);
  slider0.setVisible(isSlider0);
  qMode = 2;
  pic1.quantizeMedianCut(slider0.getValue()); 
  slider0.setVisible(isSlider0);
  qMode = 3;
  pic1.wu_quant(slider0.getValue());

代码示例来源:origin: bastienjalbert/topguw

sliderGainKal.setMinorTickSpacing(5);
sliderGainKal.setPaintLabels(true);
sliderGainKal.setVisible(false);

代码示例来源:origin: sc.fiji/Color_Inspector_3D

slider0.addChangeListener( this );
slider0.addMouseListener(this);
slider0.setVisible(false);
buttonPanel1.add(slider0);

代码示例来源:origin: sc.fiji/TrackMate_

sliderChannel.setVisible( false );
sliderChannel.setVisible( true );

代码示例来源:origin: fiji/TrackMate

sliderChannel.setVisible( false );
sliderChannel.setVisible( true );

相关文章

JSlider类方法