本文整理了Java中javax.swing.JSpinner.setBackground()
方法的一些代码示例,展示了JSpinner.setBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSpinner.setBackground()
方法的具体详情如下:
包路径:javax.swing.JSpinner
类名称:JSpinner
方法名:setBackground
暂无
代码示例来源:origin: sebbrudzinski/Open-LaTeX-Studio
private void jSpinnerZoomStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinnerZoomStateChanged
try {
int zoom = (Integer)jSpinnerZoom.getValue();
jSpinnerZoom.setBackground(Color.WHITE);
pdfDisplay.setZoom(zoom);
refreshDisplayPane();
} catch (ClassCastException e) {
jSpinnerZoom.setBackground(Color.PINK);
}
}//GEN-LAST:event_jSpinnerZoomStateChanged
代码示例来源:origin: sebbrudzinski/Open-LaTeX-Studio
private void jSpinnerZoomMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_jSpinnerZoomMouseWheelMoved
try {
int r = evt.getWheelRotation();
r = r * SPINNER_ZOOM_SIZE * -1;
externalZoomBy(r);
} catch (ClassCastException e) {
jSpinnerZoom.setBackground(Color.PINK);
}
}//GEN-LAST:event_jSpinnerZoomMouseWheelMoved
代码示例来源:origin: sebbrudzinski/Open-LaTeX-Studio
private void jScrollPane1MouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_jScrollPane1MouseWheelMoved
// if ccontrol is down then do a zoom event
if (evt.isControlDown()) {
try {
int r = evt.getWheelRotation();
r = r * SPINNER_ZOOM_SIZE * -1;
externalZoomBy(r);
} catch (ClassCastException e) {
jSpinnerZoom.setBackground(Color.PINK);
}
}
}//GEN-LAST:event_jScrollPane1MouseWheelMoved
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JSpinner spinner = (JSpinner) c;
spinner.setOpaque (false);
spinner.setFont (UIManager.getFont ("Spinner.font"));
spinner.setBackground (UIManager.getColor ("Spinner.background"));
spinner.setForeground (UIManager.getColor ("Spinner.foreground"));
spinner.setBorder (UIManager.getBorder ("Spinner.border"));
}
代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget
@Override
public void setBackground(Color bg) {
super.setBackground(bg);
if (_spinner != null) {
_spinner.setBackground(bg);
if (_spinner.getEditor() != null && _spinner.getEditor() instanceof JSpinner.DateEditor) {
JSpinner.DateEditor de = (JSpinner.DateEditor) _spinner.getEditor();
if (de.getTextField() != null) {
de.getTextField().setBackground(bg);
}
}
}
}
代码示例来源:origin: stackoverflow.com
temperature.setBackground(Color.WHITE);
add(temperature);
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the background of its child compenents.
*/
@Override
public void setBackground(Color bg) {
super.setBackground(bg);
for (int i = 0; i < getComponentCount(); i++) {
getComponent(i).setBackground(bg);
}
if (yearSpinner != null) {
yearSpinner.setBackground(bg);
yearSpinner.getEditor().setBackground(bg);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setBackground(bg);
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the background of its child compenents.
*/
@Override
public void setBackground(Color bg) {
super.setBackground(bg);
for (int i = 0; i < getComponentCount(); i++) {
getComponent(i).setBackground(bg);
}
if (yearSpinner != null) {
yearSpinner.setBackground(bg);
yearSpinner.getEditor().setBackground(bg);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setBackground(bg);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the background of its child compenents.
*/
@Override
public void setBackground(Color bg) {
super.setBackground(bg);
for (int i = 0; i < getComponentCount(); i++) {
getComponent(i).setBackground(bg);
}
if (yearSpinner != null) {
yearSpinner.setBackground(bg);
yearSpinner.getEditor().setBackground(bg);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setBackground(bg);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the background of its child compenents.
*/
@Override
public void setBackground(Color bg) {
super.setBackground(bg);
for (int i = 0; i < getComponentCount(); i++) {
getComponent(i).setBackground(bg);
}
if (yearSpinner != null) {
yearSpinner.setBackground(bg);
yearSpinner.getEditor().setBackground(bg);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setBackground(bg);
}
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the background of its child compenents.
*/
@Override
public void setBackground(Color bg) {
super.setBackground(bg);
for (int i = 0; i < getComponentCount(); i++) {
getComponent(i).setBackground(bg);
}
if (yearSpinner != null) {
yearSpinner.setBackground(bg);
yearSpinner.getEditor().setBackground(bg);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setBackground(bg);
}
}
内容来源于网络,如有侵权,请联系作者删除!