\hypertarget{classFloatSliderWithBox}{
\subsection{FloatSliderWithBox Class Reference}
\label{classFloatSliderWithBox}\index{FloatSliderWithBox@{FloatSliderWithBox}}
}


This class makes a floating point slider bar with an edit box next to it for more precision.  


\subsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classFloatSliderWithBox_1_1SliderChanged}{SliderChanged}
\item 
class \hyperlink{classFloatSliderWithBox_1_1TextChanged}{TextChanged}
\end{DoxyCompactItemize}
\subsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classFloatSliderWithBox_a6d19901600dd6636b79fe483bb31c717}{FloatSliderWithBox} (String text\_\-, double min\_\-, double max\_\-, double value\_\-, int cols, boolean rec\_\-)
\item 
\hyperlink{classFloatSliderWithBox}{FloatSliderWithBox} \hyperlink{classFloatSliderWithBox_a2adcb6b47a380a16b19ba72c48e281ef}{setUnits} (String s)
\item 
\hyperlink{classFloatSliderWithBox}{FloatSliderWithBox} \hyperlink{classFloatSliderWithBox_a329457952f592d613704627c897cc1f4}{setFormat} (String s)
\item 
void \hyperlink{classFloatSliderWithBox_a6643483041ee490fe0a0b2c3962a907e}{addChangeListener} (ChangeListener changeListener)
\item 
double \hyperlink{classFloatSliderWithBox_a41f82578f81a0224ac096097723dc0ca}{get\_\-value\_\-from\_\-slider} ()
\item 
double \hyperlink{classFloatSliderWithBox_ad1e36f186f64a82a462181ffd7bc4de0}{get\_\-value\_\-from\_\-text} ()
\end{DoxyCompactItemize}
\subsubsection*{Package Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classFloatSliderWithBox_ab36581fe4cb13cb92729efb49bda0cd2}{setValue} (double v)
\item 
double \hyperlink{classFloatSliderWithBox_accfc206a08ebc100feac5766372912f4}{getValue} ()
\end{DoxyCompactItemize}
\subsubsection*{Package Attributes}
\begin{DoxyCompactItemize}
\item 
double \hyperlink{classFloatSliderWithBox_ab82a650156e03b2d79b3a747a13554a7}{max}
\end{DoxyCompactItemize}
\subsubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
JSlider \hyperlink{classFloatSliderWithBox_a3e9112c654f6c0e87d8b030dafafc2e9}{slider}
\item 
JTextField \hyperlink{classFloatSliderWithBox_a75d4e63f5d723ec31921d1dc2fe2e6c2}{number}
\item 
JLabel \hyperlink{classFloatSliderWithBox_ab059bb7272a0e99a97cf9df33cd8b5e7}{label}
\item 
GridBagConstraints \hyperlink{classFloatSliderWithBox_abbe64a1a9da4b0def648b5c27a7f5b2b}{completePanelConstraints\_\-}
\item 
int \hyperlink{classFloatSliderWithBox_a9d95fe74ebcbc934c5e2dd57a5aafc57}{steps} = 1000000
\item 
double \hyperlink{classFloatSliderWithBox_a9949125828135f691c1e3fe5090dc7af}{min}
\item 
String \hyperlink{classFloatSliderWithBox_a494c4ce93f2a4b4f88ad3ccec4a3c098}{text}
\item 
String \hyperlink{classFloatSliderWithBox_a67059e7b178a9fcbeb10a3c544f9ce38}{units}
\item 
String \hyperlink{classFloatSliderWithBox_af2639fbebef9cc37a2d6904376ca452d}{format} = \char`\"{}\%8.3f\char`\"{}
\item 
double \hyperlink{classFloatSliderWithBox_abf138b00dd49c559709104468acffa18}{value}
\item 
boolean \hyperlink{classFloatSliderWithBox_a7639fbaa0cf4c6eeb1ffd63ac8389af9}{reciprocal}
\end{DoxyCompactItemize}


\subsubsection{Detailed Description}
This class makes a floating point slider bar with an edit box next to it for more precision. 

Also has a reciprocal option for inverse, reciprocal scaling./ 

Definition at line 685 of file three\_\-B.java.



\subsubsection{Constructor \& Destructor Documentation}
\hypertarget{classFloatSliderWithBox_a6d19901600dd6636b79fe483bb31c717}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!FloatSliderWithBox@{FloatSliderWithBox}}
\index{FloatSliderWithBox@{FloatSliderWithBox}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{FloatSliderWithBox}]{\setlength{\rightskip}{0pt plus 5cm}FloatSliderWithBox::FloatSliderWithBox (
\begin{DoxyParamCaption}
\item[{String}]{text\_\-, }
\item[{double}]{min\_\-, }
\item[{double}]{max\_\-, }
\item[{double}]{value\_\-, }
\item[{int}]{cols, }
\item[{boolean}]{rec\_\-}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFloatSliderWithBox_a6d19901600dd6636b79fe483bb31c717}


Definition at line 701 of file three\_\-B.java.



References completePanelConstraints\_\-, label, max, min, number, reciprocal, setValue(), slider, steps, text, and value.


\begin{DoxyCode}
    {
        
        super( new GridBagLayout() );

        reciprocal = rec_;
        min=min_;
        max=max_;
        text=text_;
        value = value_;

        if(reciprocal)
        {
            min=1/max_;
            max=1/min_;
        }

        slider = new JSlider(0, steps);

        label = new JLabel();
        
        number = new JTextField(cols);

        //Assemble into a panel
        completePanelConstraints_ = new GridBagConstraints();
        completePanelConstraints_.fill = GridBagConstraints.HORIZONTAL;

        completePanelConstraints_.gridx = 0;
        completePanelConstraints_.gridy = 0;
        completePanelConstraints_.weightx=1;
        this.add( slider, completePanelConstraints_ );

        completePanelConstraints_.gridx = 2;
        completePanelConstraints_.gridy = 0;
        completePanelConstraints_.weightx=0;
        this.add(label, completePanelConstraints_ );

        completePanelConstraints_.gridx = 1;
        completePanelConstraints_.gridy = 0;
        completePanelConstraints_.weightx=0;
        //Add some space to the left to move away from slider slightly
        //And some more to the bottom to help with the way they are displayed
        completePanelConstraints_.insets = new Insets(0,5,10,0);
        this.add( number, completePanelConstraints_ );

        this.setBorder(BorderFactory.createTitledBorder(text));


        slider.addChangeListener(new SliderChanged(this));
        number.addActionListener(new TextChanged(this));
        setValue(value);

    }
\end{DoxyCode}


\subsubsection{Member Function Documentation}
\hypertarget{classFloatSliderWithBox_a2adcb6b47a380a16b19ba72c48e281ef}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!setUnits@{setUnits}}
\index{setUnits@{setUnits}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{setUnits}]{\setlength{\rightskip}{0pt plus 5cm}{\bf FloatSliderWithBox} FloatSliderWithBox::setUnits (
\begin{DoxyParamCaption}
\item[{String}]{s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFloatSliderWithBox_a2adcb6b47a380a16b19ba72c48e281ef}


Definition at line 755 of file three\_\-B.java.



References setValue(), units, and value.



Referenced by EControlPanel::EControlPanel().


\begin{DoxyCode}
    {
        units = s;
        setValue(value);
        return this;
    }
\end{DoxyCode}
\hypertarget{classFloatSliderWithBox_a329457952f592d613704627c897cc1f4}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!setFormat@{setFormat}}
\index{setFormat@{setFormat}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{setFormat}]{\setlength{\rightskip}{0pt plus 5cm}{\bf FloatSliderWithBox} FloatSliderWithBox::setFormat (
\begin{DoxyParamCaption}
\item[{String}]{s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFloatSliderWithBox_a329457952f592d613704627c897cc1f4}


Definition at line 762 of file three\_\-B.java.



References format, setValue(), and value.



Referenced by EControlPanel::EControlPanel().


\begin{DoxyCode}
    {
        format = s;
        setValue(value);
        return this;
    }
\end{DoxyCode}
\hypertarget{classFloatSliderWithBox_a6643483041ee490fe0a0b2c3962a907e}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!addChangeListener@{addChangeListener}}
\index{addChangeListener@{addChangeListener}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{addChangeListener}]{\setlength{\rightskip}{0pt plus 5cm}void FloatSliderWithBox::addChangeListener (
\begin{DoxyParamCaption}
\item[{ChangeListener}]{changeListener}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFloatSliderWithBox_a6643483041ee490fe0a0b2c3962a907e}


Definition at line 769 of file three\_\-B.java.



References slider.



Referenced by EControlPanel::EControlPanel().


\begin{DoxyCode}
                                                                {
        slider.addChangeListener( changeListener );
        return;
    }
\end{DoxyCode}
\hypertarget{classFloatSliderWithBox_ab36581fe4cb13cb92729efb49bda0cd2}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!setValue@{setValue}}
\index{setValue@{setValue}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{setValue}]{\setlength{\rightskip}{0pt plus 5cm}void FloatSliderWithBox::setValue (
\begin{DoxyParamCaption}
\item[{double}]{v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, package\mbox{]}}}}
\label{classFloatSliderWithBox_ab36581fe4cb13cb92729efb49bda0cd2}


Definition at line 774 of file three\_\-B.java.



References format, label, max, min, number, reciprocal, slider, steps, units, and value.



Referenced by FloatSliderWithBox::TextChanged::actionPerformed(), FloatSliderWithBox(), setFormat(), setUnits(), and FloatSliderWithBox::SliderChanged::stateChanged().


\begin{DoxyCode}
    {
        value = v;
        if(reciprocal)
            slider.setValue((int)Math.round(steps * (1/value-min)/(max-min)));
        else
            slider.setValue((int)Math.round(steps * (value-min)/(max-min)));
            
        number.setText(String.format(format, value));
        label.setText(units);
    }
\end{DoxyCode}
\hypertarget{classFloatSliderWithBox_accfc206a08ebc100feac5766372912f4}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!getValue@{getValue}}
\index{getValue@{getValue}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{getValue}]{\setlength{\rightskip}{0pt plus 5cm}double FloatSliderWithBox::getValue (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, package\mbox{]}}}}
\label{classFloatSliderWithBox_accfc206a08ebc100feac5766372912f4}


Definition at line 786 of file three\_\-B.java.



References value.



Referenced by EControlPanel::export\_\-reconstruction\_\-as\_\-ij(), and EControlPanel::update\_\-canvas().


\begin{DoxyCode}
    {
        return value;
    }
\end{DoxyCode}
\hypertarget{classFloatSliderWithBox_a41f82578f81a0224ac096097723dc0ca}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!get\_\-value\_\-from\_\-slider@{get\_\-value\_\-from\_\-slider}}
\index{get\_\-value\_\-from\_\-slider@{get\_\-value\_\-from\_\-slider}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{get\_\-value\_\-from\_\-slider}]{\setlength{\rightskip}{0pt plus 5cm}double FloatSliderWithBox::get\_\-value\_\-from\_\-slider (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFloatSliderWithBox_a41f82578f81a0224ac096097723dc0ca}


Definition at line 791 of file three\_\-B.java.



References max, min, reciprocal, slider, and steps.



Referenced by FloatSliderWithBox::SliderChanged::stateChanged().


\begin{DoxyCode}
    { 
        if(reciprocal)
            return 1/((slider.getValue() * 1.0 / steps) * (max - min) + min);
        else
            return (slider.getValue() * 1.0 / steps) * (max - min) + min;
    }
\end{DoxyCode}
\hypertarget{classFloatSliderWithBox_ad1e36f186f64a82a462181ffd7bc4de0}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!get\_\-value\_\-from\_\-text@{get\_\-value\_\-from\_\-text}}
\index{get\_\-value\_\-from\_\-text@{get\_\-value\_\-from\_\-text}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{get\_\-value\_\-from\_\-text}]{\setlength{\rightskip}{0pt plus 5cm}double FloatSliderWithBox::get\_\-value\_\-from\_\-text (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFloatSliderWithBox_ad1e36f186f64a82a462181ffd7bc4de0}


Definition at line 798 of file three\_\-B.java.



References number.



Referenced by FloatSliderWithBox::TextChanged::actionPerformed().


\begin{DoxyCode}
    { 
        return Double.parseDouble(number.getText());
    }
\end{DoxyCode}


\subsubsection{Member Data Documentation}
\hypertarget{classFloatSliderWithBox_a3e9112c654f6c0e87d8b030dafafc2e9}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!slider@{slider}}
\index{slider@{slider}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{slider}]{\setlength{\rightskip}{0pt plus 5cm}JSlider {\bf FloatSliderWithBox::slider}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a3e9112c654f6c0e87d8b030dafafc2e9}


Definition at line 687 of file three\_\-B.java.



Referenced by addChangeListener(), FloatSliderWithBox(), get\_\-value\_\-from\_\-slider(), and setValue().

\hypertarget{classFloatSliderWithBox_a75d4e63f5d723ec31921d1dc2fe2e6c2}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!number@{number}}
\index{number@{number}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{number}]{\setlength{\rightskip}{0pt plus 5cm}JTextField {\bf FloatSliderWithBox::number}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a75d4e63f5d723ec31921d1dc2fe2e6c2}


Definition at line 688 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), get\_\-value\_\-from\_\-text(), and setValue().

\hypertarget{classFloatSliderWithBox_ab059bb7272a0e99a97cf9df33cd8b5e7}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!label@{label}}
\index{label@{label}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{label}]{\setlength{\rightskip}{0pt plus 5cm}JLabel {\bf FloatSliderWithBox::label}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_ab059bb7272a0e99a97cf9df33cd8b5e7}


Definition at line 689 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), and setValue().

\hypertarget{classFloatSliderWithBox_abbe64a1a9da4b0def648b5c27a7f5b2b}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!completePanelConstraints\_\-@{completePanelConstraints\_\-}}
\index{completePanelConstraints\_\-@{completePanelConstraints\_\-}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{completePanelConstraints\_\-}]{\setlength{\rightskip}{0pt plus 5cm}GridBagConstraints {\bf FloatSliderWithBox::completePanelConstraints\_\-}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_abbe64a1a9da4b0def648b5c27a7f5b2b}


Definition at line 690 of file three\_\-B.java.



Referenced by FloatSliderWithBox().

\hypertarget{classFloatSliderWithBox_a9d95fe74ebcbc934c5e2dd57a5aafc57}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!steps@{steps}}
\index{steps@{steps}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{steps}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf FloatSliderWithBox::steps} = 1000000\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a9d95fe74ebcbc934c5e2dd57a5aafc57}


Definition at line 692 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), get\_\-value\_\-from\_\-slider(), and setValue().

\hypertarget{classFloatSliderWithBox_a9949125828135f691c1e3fe5090dc7af}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!min@{min}}
\index{min@{min}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{min}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf FloatSliderWithBox::min}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a9949125828135f691c1e3fe5090dc7af}


Definition at line 693 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), get\_\-value\_\-from\_\-slider(), and setValue().

\hypertarget{classFloatSliderWithBox_ab82a650156e03b2d79b3a747a13554a7}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!max@{max}}
\index{max@{max}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{max}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf FloatSliderWithBox::max}\hspace{0.3cm}{\ttfamily  \mbox{[}package\mbox{]}}}}
\label{classFloatSliderWithBox_ab82a650156e03b2d79b3a747a13554a7}


Definition at line 693 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), get\_\-value\_\-from\_\-slider(), and setValue().

\hypertarget{classFloatSliderWithBox_a494c4ce93f2a4b4f88ad3ccec4a3c098}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!text@{text}}
\index{text@{text}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{text}]{\setlength{\rightskip}{0pt plus 5cm}String {\bf FloatSliderWithBox::text}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a494c4ce93f2a4b4f88ad3ccec4a3c098}


Definition at line 694 of file three\_\-B.java.



Referenced by FloatSliderWithBox().

\hypertarget{classFloatSliderWithBox_a67059e7b178a9fcbeb10a3c544f9ce38}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!units@{units}}
\index{units@{units}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{units}]{\setlength{\rightskip}{0pt plus 5cm}String {\bf FloatSliderWithBox::units}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a67059e7b178a9fcbeb10a3c544f9ce38}


Definition at line 695 of file three\_\-B.java.



Referenced by setUnits(), and setValue().

\hypertarget{classFloatSliderWithBox_af2639fbebef9cc37a2d6904376ca452d}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!format@{format}}
\index{format@{format}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{format}]{\setlength{\rightskip}{0pt plus 5cm}String {\bf FloatSliderWithBox::format} = \char`\"{}\%8.3f\char`\"{}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_af2639fbebef9cc37a2d6904376ca452d}


Definition at line 696 of file three\_\-B.java.



Referenced by setFormat(), and setValue().

\hypertarget{classFloatSliderWithBox_abf138b00dd49c559709104468acffa18}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!value@{value}}
\index{value@{value}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{value}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf FloatSliderWithBox::value}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_abf138b00dd49c559709104468acffa18}


Definition at line 698 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), getValue(), setFormat(), setUnits(), and setValue().

\hypertarget{classFloatSliderWithBox_a7639fbaa0cf4c6eeb1ffd63ac8389af9}{
\index{FloatSliderWithBox@{FloatSliderWithBox}!reciprocal@{reciprocal}}
\index{reciprocal@{reciprocal}!FloatSliderWithBox@{FloatSliderWithBox}}
\paragraph[{reciprocal}]{\setlength{\rightskip}{0pt plus 5cm}boolean {\bf FloatSliderWithBox::reciprocal}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classFloatSliderWithBox_a7639fbaa0cf4c6eeb1ffd63ac8389af9}


Definition at line 699 of file three\_\-B.java.



Referenced by FloatSliderWithBox(), get\_\-value\_\-from\_\-slider(), and setValue().



The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
\hyperlink{three__B_8java}{three\_\-B.java}\end{DoxyCompactItemize}
