Example usage for org.apache.commons.configuration FileConfiguration getString

List of usage examples for org.apache.commons.configuration FileConfiguration getString

Introduction

In this page you can find the example usage for org.apache.commons.configuration FileConfiguration getString.

Prototype

String getString(String key, String defaultValue);

Source Link

Document

Get a string associated with the given configuration key.

Usage

From source file:org.zaproxy.zap.view.MessagePanelsPositionController.java

public void restoreState() {
    FileConfiguration configuration = Model.getSingleton().getOptionsParam().getConfig();

    MessagePanelsPosition position = MessagePanelsPosition.valueOf(configuration
            .getString(LAST_POSITION_CONFIG_KEY, MessagePanelsPosition.TABS_SIDE_BY_SIDE.toString()));

    changeMessageTabsPosition(position);

    switch (position) {
    case PANEL_ABOVE:
        aboveButtonView.setSelected(true);
        break;/*from  ww  w . j  a va2 s.  c o m*/
    case PANELS_SIDE_BY_SIDE:
        sideBySideButtonView.setSelected(true);
        break;
    case TABS_SIDE_BY_SIDE:
    default:
        tabsButtonView.setSelected(true);
    }
}