Logo Search packages:      
Sourcecode: wims version File versions  Download package

void fr::ove::openmath::jome::model::processor::WidthProcessor::addNewWidth ( int  width  )  [inline, private]

Adds the specified width value in the list if necessary

Parameters:
width the width value to add

Definition at line 269 of file WidthProcessor.java.

References widthList.

Referenced by buildWidthList().

                                        {
        int currentWidth;
        
        if (widthList.size() == 0)
            widthList.addElement(new Integer(width));
        else {
            for (int i = 0; i < widthList.size(); i++) {
                currentWidth = ((Integer) widthList.elementAt(i)).intValue();
                if (width == currentWidth)
                    return;
                else if (width < currentWidth) {
                    widthList.insertElementAt(new Integer(width), i);
                    return;
                }
            }
            widthList.addElement(new Integer(width));
        }
    }


Generated by  Doxygen 1.6.0   Back to index