當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertiesComponent.getInt方法代碼示例

本文整理匯總了Java中com.intellij.ide.util.PropertiesComponent.getInt方法的典型用法代碼示例。如果您正苦於以下問題:Java PropertiesComponent.getInt方法的具體用法?Java PropertiesComponent.getInt怎麽用?Java PropertiesComponent.getInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.ide.util.PropertiesComponent的用法示例。


在下文中一共展示了PropertiesComponent.getInt方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: start

import com.intellij.ide.util.PropertiesComponent; //導入方法依賴的package包/類
public static void start () {
    PropertiesComponent prop = PropertiesComponent.getInstance();
    int interval = prop.getInt(Settings.INTERVAL, 0);
    if (runningInterval == interval || interval == 0) {
        return;
    }
    if (service != null) {
        stop();
    }
    RandomBackgroundTask task = new RandomBackgroundTask();
    service = Executors.newSingleThreadScheduledExecutor();
    try {
        int delay = prop.isValueSet(IdeBackgroundUtil.EDITOR_PROP)
                ? interval
                : 0;
        service.scheduleAtFixedRate(task, delay, interval, TimeUnit.MINUTES);
        runningInterval = interval;
    } catch (RejectedExecutionException e) {
        stop();
    }
}
 
開發者ID:lachlankrautz,項目名稱:backgroundImagePlus,代碼行數:22,代碼來源:BackgroundService.java

示例2: applyAndSave

import com.intellij.ide.util.PropertiesComponent; //導入方法依賴的package包/類
public static void applyAndSave(@NotNull PropertiesComponent p,
                                @NotNull UISettings ui,
                                @NotNull EditorSettingsExternalizable.OptionSet eo,
                                @NotNull DaemonCodeAnalyzerSettings ds,
                                String before, String after, boolean value) {
  // @formatter:off
  p.setValue(before + "SHOW_STATUS_BAR",          valueOf(ui.SHOW_STATUS_BAR));           ui.SHOW_STATUS_BAR          = p.getBoolean(after + "SHOW_STATUS_BAR",  value); 
  p.setValue(before + "SHOW_MAIN_TOOLBAR",        valueOf(ui.SHOW_MAIN_TOOLBAR));         ui.SHOW_MAIN_TOOLBAR        = p.getBoolean(after + "SHOW_MAIN_TOOLBAR", value); 
  p.setValue(before + "SHOW_NAVIGATION_BAR",      valueOf(ui.SHOW_NAVIGATION_BAR));       ui.SHOW_NAVIGATION_BAR      = p.getBoolean(after + "SHOW_NAVIGATION_BAR", value); 

  p.setValue(before + "IS_FOLDING_OUTLINE_SHOWN", valueOf(eo.IS_FOLDING_OUTLINE_SHOWN));  eo.IS_FOLDING_OUTLINE_SHOWN = p.getBoolean(after + "IS_FOLDING_OUTLINE_SHOWN", value); 
  p.setValue(before + "IS_WHITESPACES_SHOWN",     valueOf(eo.IS_WHITESPACES_SHOWN));      eo.IS_WHITESPACES_SHOWN     = p.getBoolean(after + "IS_WHITESPACES_SHOWN", value); 
  p.setValue(before + "ARE_LINE_NUMBERS_SHOWN",   valueOf(eo.ARE_LINE_NUMBERS_SHOWN));    eo.ARE_LINE_NUMBERS_SHOWN   = p.getBoolean(after + "ARE_LINE_NUMBERS_SHOWN", value); 
  p.setValue(before + "IS_RIGHT_MARGIN_SHOWN",    valueOf(eo.IS_RIGHT_MARGIN_SHOWN));     eo.IS_RIGHT_MARGIN_SHOWN    = p.getBoolean(after + "IS_RIGHT_MARGIN_SHOWN", value); 
  p.setValue(before + "IS_INDENT_GUIDES_SHOWN",   valueOf(eo.IS_INDENT_GUIDES_SHOWN));    eo.IS_INDENT_GUIDES_SHOWN   = p.getBoolean(after + "IS_INDENT_GUIDES_SHOWN", value); 
  p.setValue(before + "SHOW_BREADCRUMBS",         valueOf(eo.SHOW_BREADCRUMBS));          eo.SHOW_BREADCRUMBS         = p.getBoolean(after + "SHOW_BREADCRUMBS", value); 

  p.setValue(before + "SHOW_METHOD_SEPARATORS",   valueOf(ds.SHOW_METHOD_SEPARATORS));    ds.SHOW_METHOD_SEPARATORS   = p.getBoolean(after + "SHOW_METHOD_SEPARATORS", value);
  
  p.setValue(before + "HIDE_TOOL_STRIPES",        valueOf(ui.HIDE_TOOL_STRIPES));         ui.HIDE_TOOL_STRIPES        = p.getBoolean(after + "HIDE_TOOL_STRIPES", !value);
  p.setValue(before + "EDITOR_TAB_PLACEMENT",     valueOf(ui.EDITOR_TAB_PLACEMENT));      ui.EDITOR_TAB_PLACEMENT     = p.getInt(after + "EDITOR_TAB_PLACEMENT", value ? SwingConstants.TOP : UISettings.TABS_NONE);
  // @formatter:on
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:ToggleDistractionFreeModeAction.java

示例3: intervalModified

import com.intellij.ide.util.PropertiesComponent; //導入方法依賴的package包/類
private boolean intervalModified (PropertiesComponent prop) {
    int storedInterval = prop.getInt(INTERVAL, 0);
    int uiInterval = ((SpinnerNumberModel) intervalSpinner.getModel()).getNumber().intValue();
    return storedInterval != uiInterval;
}
 
開發者ID:lachlankrautz,項目名稱:backgroundImagePlus,代碼行數:6,代碼來源:Settings.java

示例4: createUIComponents

import com.intellij.ide.util.PropertiesComponent; //導入方法依賴的package包/類
private void createUIComponents() {
    PropertiesComponent prop = PropertiesComponent.getInstance();
    intervalSpinner = new JSpinner(new SpinnerNumberModel(prop.getInt(INTERVAL, 0), 0, 1000, 5));
}
 
開發者ID:lachlankrautz,項目名稱:backgroundImagePlus,代碼行數:5,代碼來源:Settings.java


注:本文中的com.intellij.ide.util.PropertiesComponent.getInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。