FileDocCategorySizeDatePackage
PMPanel.javaAPI DocJMF 2.1.1e2655Mon May 12 12:20:30 BST 2003jmapps.registry

PMPanel

public class PMPanel extends JMPanel implements VectorEditor

Fields Summary
private static final int
PROTOCOL
private static final int
CONTENT
VectorPanel
panelProtocol
VectorPanel
panelContent
Vector
protocolValues
Vector
contentValues
Constructors Summary
public PMPanel()



      
        super();

        setLayout ( new GridLayout(1,0,12,12) );

        panelProtocol = new VectorPanel ( JMFI18N.getResource("jmfregistry.protocolprefix.vector.label"),
                                                (VectorEditor)this, PROTOCOL );
        add ( panelProtocol );
        
        panelContent = new VectorPanel ( JMFI18N.getResource("jmfregistry.contentprefix.vector.label"),
                                                (VectorEditor)this, CONTENT );
        add ( panelContent );
    
Methods Summary
public booleanaddToList(int code, java.lang.String value)

        if (code == PROTOCOL) {
            if (protocolValues.indexOf(value) < 0)
                return true;
            else
                return false;
        }
        else {
            if (contentValues.indexOf(value) < 0)
                return true;
            else
                return false;
        }
    
public voidcommit(int code)

        if (code == PROTOCOL) {
            PackageManager.setProtocolPrefixList(protocolValues);
            PackageManager.commitProtocolPrefixList();
        }
        else {
            PackageManager.setContentPrefixList(contentValues);
            PackageManager.commitContentPrefixList();
        }
    
public java.util.VectorgetList(int code)
VectorEditor implementation

        if (code == PROTOCOL) {
            protocolValues = (Vector) PackageManager.getProtocolPrefixList().clone();
            return protocolValues;
        }
        else {
            contentValues = (Vector) PackageManager.getContentPrefixList().clone();
            return contentValues;
        }
    
public voidselectedIndex(int code, int index)

	// Nothing to to
    
public voidsetList(int code, java.util.Vector list)

        if (code == PROTOCOL)
            protocolValues = list;
        else
            contentValues = list;