private void createControl(JPanel eventControlsPanel,
            final Event currentEvent,
            final String prefixLabel,
            final String suffixLabel,
            final int dataFieldSize,
            final int argumentIndex)
    {
        if (null != prefixLabel)
        {
            eventControlsPanel.add(new JLabel(prefixLabel));
        }
        
        JComponent inputControl;
        int argumentDataType = currentEvent.getArgumentDataTypeAtIndex(argumentIndex);
        switch (argumentDataType)
        {
            case EventFormat.ARGUMENT_DATA_TYPE__UNSIGNED_BYTE:
                inputControl = new IntTextField(3, new IntValueHolder() {
                    public int getValue() { return ((Number)currentEvent.getArgumentAtIndex(argumentIndex)).intValue(); }
                    public void setValue(int value) { currentEvent.setArgumentAtIndex(argumentIndex, new Integer(value)); }
                });
                break;
            case EventFormat.ARGUMENT_DATA_TYPE__UNSIGNED_SHORT:
                inputControl = new IntTextField(5, new IntValueHolder() {
                    public int getValue() { return ((Number)currentEvent.getArgumentAtIndex(argumentIndex)).intValue(); }
                    public void setValue(int value) { currentEvent.setArgumentAtIndex(argumentIndex, new Integer(value)); }
                });
                break;
            case EventFormat.ARGUMENT_DATA_TYPE__SIGNED_INT:
                inputControl = new IntTextField(5, new IntValueHolder() {
                    public int getValue() { return ((Number)currentEvent.getArgumentAtIndex(argumentIndex)).intValue(); }
                    public void setValue(int value) { currentEvent.setArgumentAtIndex(argumentIndex, new Integer(value)); }
                });
                break;
            case EventFormat.ARGUMENT_DATA_TYPE__STRING:
                inputControl = new StringTextField(new StringValueHolder()
                {
                    public int getMaxLength() {
                        return currentEvent.getEventFormat().getArgumentTypeDataSize(
                                currentEvent.getEventFormat().getArgumentTypeAtIndexForCommandType(
                                        argumentIndex, currentEvent.getCommandType()))
                                - 1; 
                    }
                    public String getValue() { return (String)currentEvent.getArgumentAtIndex(argumentIndex); }
                    public void setValue(String value) { currentEvent.setArgumentAtIndex(argumentIndex, value); }
                });
            	break;
            case EventFormat.ARGUMENT_DATA_TYPE__COORDINATE_SET:
                inputControl = new Vertex3DTextFieldPanel(new Vertex3DValueHolder()
                {
                    public int getX() {
                        CoordinateSet coordinateSet = (CoordinateSet)currentEvent.getArgumentAtIndex(argumentIndex);
                        return coordinateSet.getX(); }
                    public void setX(int x) { 
                        CoordinateSet coordinateSet = (CoordinateSet)currentEvent.getArgumentAtIndex(argumentIndex);
                        coordinateSet.setX(x); }
                    public int getY() { 
                        CoordinateSet coordinateSet = (CoordinateSet)currentEvent.getArgumentAtIndex(argumentIndex);
                        return coordinateSet.getY(); }
                    public void setY(int y) { 
                        CoordinateSet coordinateSet = (CoordinateSet)currentEvent.getArgumentAtIndex(argumentIndex);
                        coordinateSet.setY(y); }
                    public int getZ() { 
                        CoordinateSet coordinateSet = (CoordinateSet)currentEvent.getArgumentAtIndex(argumentIndex);
                        return coordinateSet.getZ(); }
                    public void setZ(int z) { 
                        CoordinateSet coordinateSet = (CoordinateSet)currentEvent.getArgumentAtIndex(argumentIndex);
                        coordinateSet.setZ(z); }
                });
            	break;
            case EventFormat.ARGUMENT_DATA_TYPE__CHOICE_PULLDOWN:
                Map argumentTypeValuesMap = currentEvent.getEventFormat().getArgumentTypeChoicesArray(
                        currentEvent.getEventFormat().getArgumentTypeAtIndexForCommandType(
                                argumentIndex, currentEvent.getCommandType()));
            	
                inputControl = new StringComboBox(argumentTypeValuesMap, new ObjectValueHolder() {
                    public Object getValue() { return currentEvent.getArgumentAtIndex(argumentIndex); }
                    public void setValue(Object value) { currentEvent.setArgumentAtIndex(argumentIndex, value); }
                });
                break;
            case EventFormat.ARGUMENT_DATA_TYPE__PLACEHOLDER:
                inputControl = new JLabel(".");
                break;
            default:
                throw new RuntimeException("Unsupported argumentDataType: " + argumentDataType);
        }

        eventControlsPanel.add(inputControl);

        if (null != suffixLabel)
        {
            eventControlsPanel.add(new JLabel(suffixLabel));
        }
        
    }