mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
v8 log processing, filter call trees by 1% by default
This commit is contained in:
@@ -66,14 +66,32 @@ public class SliderSelectorAction extends DumbAwareAction {
|
||||
JPanel wrapper = new JPanel(new BorderLayout());
|
||||
wrapper.add(label, BorderLayout.NORTH);
|
||||
|
||||
final JSlider slider = new JSlider(SwingConstants.HORIZONTAL, myConfiguration.getMin(), myConfiguration.getMax(), myConfiguration.getSelected());
|
||||
final Dictionary dictionary = myConfiguration.getDictionary();
|
||||
final Enumeration elements = dictionary.elements();
|
||||
final JSlider slider = new JSlider(SwingConstants.HORIZONTAL, myConfiguration.getMin(), myConfiguration.getMax(), myConfiguration.getSelected()) {
|
||||
Integer myWidth = null;
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
final Dimension size = super.getPreferredSize();
|
||||
if (myWidth == null) {
|
||||
myWidth = 10;
|
||||
final FontMetrics fm = getFontMetrics(getFont());
|
||||
while (elements.hasMoreElements()) {
|
||||
String text = ((JLabel)elements.nextElement()).getText();
|
||||
myWidth += fm.stringWidth(text + "W");
|
||||
}
|
||||
}
|
||||
return new Dimension(myWidth, size.height);
|
||||
}
|
||||
};
|
||||
|
||||
slider.setMinorTickSpacing(1);
|
||||
slider.setPaintTicks(true);
|
||||
slider.setPaintTrack(true);
|
||||
slider.setSnapToTicks(true);
|
||||
UIUtil.setSliderIsFilled(slider, true);
|
||||
slider.setPaintLabels(true);
|
||||
slider.setLabelTable(myConfiguration.getDictionary());
|
||||
slider.setLabelTable(dictionary);
|
||||
|
||||
if (! myConfiguration.isShowOk()) {
|
||||
result.add(wrapper, BorderLayout.WEST);
|
||||
|
||||
Reference in New Issue
Block a user