List of usage examples for org.apache.commons.configuration FileConfiguration getBoolean
boolean getBoolean(String key, boolean defaultValue);
From source file:org.zaproxy.zap.extension.httppanel.view.syntaxhighlight.AutoDetectSyntaxHttpPanelTextArea.java
@Override public void loadConfiguration(String key, FileConfiguration fileConfiguration) { super.loadConfiguration(key, fileConfiguration); setAutoDetectSyntax(fileConfiguration.getBoolean(key + "syntax." + AUTO_DETECT, isAutoDetectSyntax)); }
From source file:org.zaproxy.zap.extension.httppanel.view.syntaxhighlight.HttpPanelSyntaxHighlightTextArea.java
public void loadConfiguration(String key, FileConfiguration fileConfiguration) { setAntiAliasingEnabled(fileConfiguration.getBoolean(key + ANTI_ALIASING, this.getAntiAliasingEnabled())); Component c = getParent();/*from ww w. j a v a 2 s.c om*/ if (c instanceof JViewport) { c = c.getParent(); if (c instanceof RTextScrollPane) { final RTextScrollPane scrollPane = (RTextScrollPane) c; scrollPane.setLineNumbersEnabled( fileConfiguration.getBoolean(key + SHOW_LINE_NUMBERS, scrollPane.getLineNumbersEnabled())); } } setLineWrap(fileConfiguration.getBoolean(key + WORD_WRAP, this.getLineWrap())); setHighlightCurrentLine( fileConfiguration.getBoolean(key + HIGHLIGHT_CURRENT_LINE, this.getHighlightCurrentLine())); setFadeCurrentLineHighlight(fileConfiguration.getBoolean(key + FADE_CURRENT_HIGHLIGHT_LINE, this.getFadeCurrentLineHighlight())); setWhitespaceVisible( fileConfiguration.getBoolean(key + SHOW_WHITESPACE_CHARACTERS, this.isWhitespaceVisible())); setEOLMarkersVisible( fileConfiguration.getBoolean(key + SHOW_NEWLINE_CHARACTERS, this.getEOLMarkersVisible())); setMarkOccurrences(fileConfiguration.getBoolean(key + MARK_OCCURRENCES, this.getMarkOccurrences())); setRoundedSelectionEdges( fileConfiguration.getBoolean(key + ROUNDED_SELECTION_EDGES, this.getRoundedSelectionEdges())); setBracketMatchingEnabled( fileConfiguration.getBoolean(key + BRACKET_MATCHING, this.isBracketMatchingEnabled())); setAnimateBracketMatching( fileConfiguration.getBoolean(key + ANIMATED_BRACKET_MATCHING, this.getAnimateBracketMatching())); }
From source file:org.zaproxy.zap.extension.scripts.SyntaxHighlightTextArea.java
public void loadConfiguration(String key, FileConfiguration fileConfiguration) { setAntiAliasingEnabled(fileConfiguration.getBoolean(key + ANTI_ALIASING, this.getAntiAliasingEnabled())); Component c = getParent();/* w w w. j av a 2 s .co m*/ if (c instanceof JViewport) { c = c.getParent(); if (c instanceof RTextScrollPane) { final RTextScrollPane scrollPane = (RTextScrollPane) c; scrollPane.setLineNumbersEnabled( fileConfiguration.getBoolean(key + SHOW_LINE_NUMBERS, scrollPane.getLineNumbersEnabled())); setCodeFoldingEnabled( fileConfiguration.getBoolean(key + CODE_FOLDING, this.isCodeFoldingEnabled())); scrollPane.setFoldIndicatorEnabled(this.isCodeFoldingEnabled()); } } setLineWrap(fileConfiguration.getBoolean(key + WORD_WRAP, this.getLineWrap())); setHighlightCurrentLine( fileConfiguration.getBoolean(key + HIGHLIGHT_CURRENT_LINE, this.getHighlightCurrentLine())); setFadeCurrentLineHighlight(fileConfiguration.getBoolean(key + FADE_CURRENT_HIGHLIGHT_LINE, this.getFadeCurrentLineHighlight())); setWhitespaceVisible( fileConfiguration.getBoolean(key + SHOW_WHITESPACE_CHARACTERS, this.isWhitespaceVisible())); setEOLMarkersVisible( fileConfiguration.getBoolean(key + SHOW_NEWLINE_CHARACTERS, this.getEOLMarkersVisible())); setMarkOccurrences(fileConfiguration.getBoolean(key + MARK_OCCURRENCES, this.getMarkOccurrences())); setRoundedSelectionEdges( fileConfiguration.getBoolean(key + ROUNDED_SELECTION_EDGES, this.getRoundedSelectionEdges())); setBracketMatchingEnabled( fileConfiguration.getBoolean(key + BRACKET_MATCHING, this.isBracketMatchingEnabled())); setAnimateBracketMatching( fileConfiguration.getBoolean(key + ANIMATED_BRACKET_MATCHING, this.getAnimateBracketMatching())); }
From source file:org.zaproxy.zap.extension.websocket.ui.OptionsParamWebSocket.java
@Override protected void parse() { FileConfiguration cfg = getConfig(); isForwardAll = cfg.getBoolean(FORWARD_ALL, false); isBreakOnPingPong = cfg.getBoolean(BREAK_ON_PING_PONG, false); isBreakOnAll = cfg.getBoolean(BREAK_ON_ALL, false); confirmRemoveProxyExcludeRegex = cfg.getBoolean(CONFIRM_REMOVE_PROXY_EXCLUDE_REGEX_KEY, false); removeExtensionsHeader = cfg.getBoolean(REMOVE_EXTENSIONS_HEADER_KEY, true); }