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

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

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

JSlider.setEnabled介绍

暂无

代码示例

代码示例来源:origin: 4thline/cling

@Override
public void setSelectionEnabled(boolean enabled) {
  muteButton.setEnabled(enabled);
  volumeSlider.setEnabled(enabled);
}

代码示例来源:origin: 4thline/cling

public void itemStateChanged(ItemEvent itemEvent) {
    int state = itemEvent.getStateChange();
    if (state == ItemEvent.SELECTED) {
      muteButton.setIcon(ICON_MUTE_ON);
      volumeSlider.setEnabled(false);
    } else {
      muteButton.setIcon(ICON_MUTE_OFF);
      volumeSlider.setEnabled(true);
    }
  }
});

代码示例来源:origin: bonnyfone/vectalign

private void updateMorphingControls(){
  if(svgMorphing.isAnimating()){
    btnMorphAnimation.setIcon(icnPause);
    sliderMorphing.setValue((int) (svgMorphing.getCurrentStep() * sliderMorphing.getMaximum()));
    sliderMorphing.setEnabled(false);
  }
  else{
    btnMorphAnimation.setIcon(icnPlay);
    sliderMorphing.setValue((int) (svgMorphing.getCurrentStep() * sliderMorphing.getMaximum()));
    sliderMorphing.setEnabled(true);
  }
}

代码示例来源:origin: 4thline/cling

protected void run(InstanceViewImpl view) {
    // TODO controller.togglePlayPauseAction();
    view.getProgressPanel().getPositionSlider().setEnabled(false);
  }
};

代码示例来源:origin: 4thline/cling

public ProgressPanel() {
  super();
  setBorder(BorderFactory.createTitledBorder("Position"));
  setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
  positionLabel.setText("00:00:00/00:00:00");
  positionLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
  positionSlider.setEnabled(false);
  positionSlider.setPreferredSize(new Dimension(200, 24));
  add(positionSlider);
  add(positionLabel);
}

代码示例来源:origin: 4thline/cling

@Override
public void setSelectionEnabled(boolean enabled) {
  playerPanel.setBorder(BorderFactory.createTitledBorder(enabled ? "" : "DISABLED"));
  playerPanel.setAllButtons(enabled);
  progressPanel.getPositionSlider().setEnabled(enabled);
}

代码示例来源:origin: 4thline/cling

public void setProgress(PositionInfo positionInfo) {
  if (positionInfo == null) {
    positionLabel.setText("00:00:00/00:00:00");
    setPositionSliderWithoutNotification(0);
  } else {
    if (positionInfo.getTrackDurationSeconds() > 0) {
      positionLabel.setText(positionInfo.getRelTime() + "/"  + positionInfo.getTrackDuration());
      setPositionSliderWithoutNotification(positionInfo.getElapsedPercent());
      positionSlider.setEnabled(true);
    } else {
      positionLabel.setText(positionInfo.getRelTime());
      positionSlider.setEnabled(false);
    }
  }
  this.positionInfo = positionInfo;
}

代码示例来源:origin: 4thline/cling

protected void run(InstanceViewImpl view) {
    view.getPlayerPanel().togglePause();
    view.getProgressPanel().getPositionSlider().setEnabled(false);
  }
};

代码示例来源:origin: 4thline/cling

protected void run(InstanceViewImpl view) {
    view.getPlayerPanel().setBorder(BorderFactory.createTitledBorder("NO MEDIA PRESENT"));
    view.getPlayerPanel().setAllButtons(false);
    view.getProgressPanel().getPositionSlider().setEnabled(false);
  }
};

代码示例来源:origin: 4thline/cling

protected void run(InstanceViewImpl view) {
    view.getPlayerPanel().setBorder(BorderFactory.createTitledBorder("PLAYING"));
    view.getPlayerPanel().setAllButtons(true);
    view.getPlayerPanel().togglePause();
    view.getProgressPanel().getPositionSlider().setEnabled(true);
  }
};

代码示例来源:origin: 4thline/cling

protected void run(InstanceViewImpl view) {
    view.getPlayerPanel().setBorder(BorderFactory.createTitledBorder("PAUSED PLAY"));
    view.getPlayerPanel().setAllButtons(false);
    // TODO controller.togglePlayPauseAction();
    view.getPlayerPanel().getStopButton().setEnabled(true);
    view.getPlayerPanel().getPlayButton().setEnabled(true);
    view.getProgressPanel().getPositionSlider().setEnabled(true);
    view.getPlayerPanel().getPreviousButton().setEnabled(true);
    view.getPlayerPanel().getNextButton().setEnabled(true);
  }
};

代码示例来源:origin: kaikramer/keystore-explorer

@Override
  public void itemStateChanged(ItemEvent evt) {
    jlMinimumPasswordQuality.setEnabled(jcbEnablePasswordQuality.isSelected()
        && jcbEnforceMinimumPasswordQuality.isSelected());
    jsMinimumPasswordQuality.setEnabled(jcbEnablePasswordQuality.isSelected()
        && jcbEnforceMinimumPasswordQuality.isSelected());
  }
});

代码示例来源:origin: org.gephi/visualization

private void setEnable(boolean enable) {
  autoSelectNeigborCheckbox.setEnabled(enable);
  backgroundColorButton.setEnabled(enable);
  hightlightCheckBox.setEnabled(enable);
  labelBackgroundColor.setEnabled(enable);
  labelZoom.setEnabled(enable);
  zoomSlider.setEnabled(enable);
}

代码示例来源:origin: kaikramer/keystore-explorer

@Override
  public void itemStateChanged(ItemEvent evt) {
    jcbEnforceMinimumPasswordQuality.setEnabled(jcbEnablePasswordQuality.isSelected());
    jlMinimumPasswordQuality.setEnabled(jcbEnablePasswordQuality.isSelected()
        && jcbEnforceMinimumPasswordQuality.isSelected());
    jsMinimumPasswordQuality.setEnabled(jcbEnablePasswordQuality.isSelected()
        && jcbEnforceMinimumPasswordQuality.isSelected());
  }
});

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

@Override
public void setEnabled(boolean enabled) {
  super.setEnabled(enabled);
  slider.setEnabled(enabled);
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/graph

private void onShowEdges()
{
 _panel.btnFormat.setEnabled(_panel.chkShowEdges.isSelected());
 _panel.cboFormat.setEnabled(_panel.chkShowEdges.isSelected());
 _panel.sldEdges.setEnabled(_panel.chkShowEdges.isSelected());
 _panel.btnPrint.setEnabled(_panel.chkShowEdges.isSelected());
 fireEdgesGraphComponentChanged(_panel.chkShowEdges.isSelected() && _panel.isVisible());
}

代码示例来源:origin: entertailion/Fling

public void actionPerformed(ActionEvent e) {
    rampClient.stop();
    setDuration(0);
    scrubber.setValue(0);
    scrubber.setEnabled(false);
  }
});

代码示例来源:origin: cytoscape.coreplugins/manual-layout

public void onSelectEvent(final SelectEvent event) {
  final boolean currentNetworkHasSelectedNodes = 
    Cytoscape.getCurrentNetworkView().getSelectedNodeIndices().length > 0;
  slider.setEnabled(!controllingCheckBox.isSelected() || currentNetworkHasSelectedNodes);
}

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

@Override
  public void actionPerformed(ActionEvent e) {
    boolean enabled = enableVideoAdjustCheckBox.isSelected();
    contrastSlider.setEnabled(enabled);
    brightnessSlider.setEnabled(enabled);
    hueSlider.setEnabled(enabled);
    saturationSlider.setEnabled(enabled);
    gammaSlider.setEnabled(enabled);
    mediaPlayer.video().setAdjustVideo(enabled);
  }
});

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

private void updateSrc() {
 isUpdating_ = true;
 slIntensite_.setEnabled(src_ != null);
 if (src_ != null) {
  slIntensite_.getModel().setValue((int) (MAX_SLIDER * src_.getIntensite()));
  vecteur_ = new Vector3f(src_.getDirection());
 }
 repaint();
 isUpdating_ = false;
}

相关文章

JSlider类方法