|
|
@ -107,6 +107,7 @@ public class JSliderPane extends JPanel { |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
sliderValue = slider.getValue(); |
|
|
|
sliderValue = slider.getValue(); |
|
|
|
getTimes(sliderValue); |
|
|
|
getTimes(sliderValue); |
|
|
|
|
|
|
|
showValue = times; |
|
|
|
showVal.setText(times + "%"); |
|
|
|
showVal.setText(times + "%"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -120,6 +121,7 @@ public class JSliderPane extends JPanel { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void insertUpdate(DocumentEvent e) { |
|
|
|
public void insertUpdate(DocumentEvent e) { |
|
|
|
isButtonOrIsTxt = true; |
|
|
|
isButtonOrIsTxt = true; |
|
|
|
|
|
|
|
resolutionTimes = divide(showValue,100,2); |
|
|
|
refreshSlider(); |
|
|
|
refreshSlider(); |
|
|
|
refreshBody(); |
|
|
|
refreshBody(); |
|
|
|
} |
|
|
|
} |
|
|
@ -147,9 +149,9 @@ public class JSliderPane extends JPanel { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void refreshBody(){ |
|
|
|
private void refreshBody(){ |
|
|
|
this.resolutionTimes = divide(showValue,100,2); |
|
|
|
|
|
|
|
int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes); |
|
|
|
// int resolution = (int) (ScreenResolution.getScreenResolution()*resolutionTimes);
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); |
|
|
|
// HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution);
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -175,16 +177,20 @@ public class JSliderPane extends JPanel { |
|
|
|
if(e.getActionCommand().equals("less")){ |
|
|
|
if(e.getActionCommand().equals("less")){ |
|
|
|
int newDownVal = showValue - 10; |
|
|
|
int newDownVal = showValue - 10; |
|
|
|
if (newDownVal >= 10 ){ |
|
|
|
if (newDownVal >= 10 ){ |
|
|
|
|
|
|
|
showValue = newDownVal; |
|
|
|
showVal.setText(newDownVal + "%"); |
|
|
|
showVal.setText(newDownVal + "%"); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
|
|
|
|
showValue = newDownVal; |
|
|
|
showVal.setText(10 + "%"); |
|
|
|
showVal.setText(10 + "%"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(e.getActionCommand().equals("more")){ |
|
|
|
if(e.getActionCommand().equals("more")){ |
|
|
|
int newUpVal = showValue + 10; |
|
|
|
int newUpVal = showValue + 10; |
|
|
|
if (newUpVal <= 400 ){ |
|
|
|
if (newUpVal <= 400 ){ |
|
|
|
|
|
|
|
showValue = newUpVal; |
|
|
|
showVal.setText(newUpVal + "%"); |
|
|
|
showVal.setText(newUpVal + "%"); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
|
|
|
|
showValue = newUpVal; |
|
|
|
showVal.setText(400 + "%"); |
|
|
|
showVal.setText(400 + "%"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|