All Downloads are FREE. Search and download functionalities are using the official Maven repository.

crcl.ui.LengthUnitComboBox Maven / Gradle / Ivy

There is a newer version: 1.8
Show newest version
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package crcl.ui;

import crcl.base.LengthUnitEnumType;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;

/**
 * Combo Box with model set to LengthUnitEnumType values.
 * 
 * @author Will Shackleford {@literal }
 */
public class LengthUnitComboBox extends JComboBox{
    
    public LengthUnitComboBox() {
        setModel(new DefaultComboBoxModel<>(LengthUnitEnumType.values()));
        setSelectedItem(LengthUnitEnumType.MILLIMETER);
    }

    @Override
    public LengthUnitEnumType getSelectedItem() {
        return (LengthUnitEnumType) super.getSelectedItem(); 
    }
    private static final Logger LOG = Logger.getLogger(LengthUnitComboBox.class.getName());
    
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy