Sha256: 9d7b33fc74ffb92856dd205b24975e21336d2ceefa66322c237b1a72fd79a6ba

Contents?: true

Size: 1.32 KB

Versions: 76

Compression:

Stored size: 1.32 KB

Contents

package rhomobile;

import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.component.ObjectChoiceField;
import net.rim.device.api.ui.component.EditField;
import com.rho.RhoLogger;

public class LogOptionsScreen extends MainScreen {

	ObjectChoiceField m_cbxLevels;
	EditField         m_enabledCat;
	EditField         m_disabledCat;
	
	public LogOptionsScreen(){
		setTitle( new LabelField( "Log Options", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH ) );
		
		String levels[] = {"Trace","Info","Warning","Error"};
		m_cbxLevels = new ObjectChoiceField("Log level: ", levels);
		m_cbxLevels.setSelectedIndex(RhoLogger.getLogConf().getMinSeverity());
		add(m_cbxLevels);
		
		m_enabledCat = new EditField("Message classes(* for all):",
				RhoLogger.getLogConf().getEnabledCategories());
		m_disabledCat = new EditField("Exclude message classes:",
				RhoLogger.getLogConf().getDisabledCategories()); 
		
		add(m_enabledCat);
		add(m_disabledCat);
	}

	protected boolean onSave() {
		RhoLogger.getLogConf().setMinSeverity(m_cbxLevels.getSelectedIndex());
		RhoLogger.getLogConf().setEnabledCategories(m_enabledCat.getText());
		RhoLogger.getLogConf().setDisabledCategories(m_disabledCat.getText());
		
		RhoLogger.getLogConf().saveToFile();
		
		return super.onSave();
	}
}

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
rhodes-2.4.0 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.4.0.beta.2 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.4.0.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.2 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.2.beta.2 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.2.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.1.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.0 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.0.beta.3 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.0.beta.2 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.3.0.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.6 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.6.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.5 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.5.beta.3 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.5.beta.2 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.5.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.4.beta.1 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java
rhodes-2.2.3 platform/bb/rhodes/src/rhomobile/LogOptionsScreen.java