下面列出了怎么用javax.swing.plaf.synth.SynthScrollBarUI的API类实例代码及写法,或者点击链接到github查看源代码。
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new SynthLookAndFeel());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new JScrollBar().setUI(new SynthScrollBarUI() {
protected void configureScrollBarColors() {
super.configureScrollBarColors();
isMethodCalled = true;
}
});
if (!isMethodCalled) {
throw new RuntimeException("The configureScrollBarColors was not called");
}
}
});
}