@Override
    public Object getItem(){
        parent.zoomSlider.setValueIsAdjusting(true);
        String editorText = editor.getText();
        int newVal =0;
        if(editorText!=null){
            if(editorText.toLowerCase().endsWith("fit")) parent.zoomSlider.setValue(0);
            else{
                StringBuffer numbers = new StringBuffer();
                char c;
                for (int i=0;i<editorText.length();i++) {
                    c = editorText.charAt(i);
                    if (Character.isDigit(c)) {
                        numbers.append(c);
                    }
                }
                try{
                    newVal=Integer.parseInt(numbers.toString());
                    parent.zoomSlider.setValue(newVal);
                } catch (Exception e){
                    //fail silently if invalid
                }
            }
        }
        if(parent.zoomSlider.getValue()<300) {
            parent.zoomSlider.setValueIsAdjusting(false);
        return parent.zoomSlider.getValue();
        }
        mainGUI.zoomTo(newVal);
        return newVal;
    }
}
class RefreshableComboBoxModel extends DefaultComboBoxModel{
    RefreshableComboBoxModel(Object[] itmes){
        super(itmes);
    }
    public void refresh(){
        this.fireContentsChanged(this, 0, 2);
    }