public static String getMencoderInPref() { return BuPreferences.BU.getStringProperty("mencoder.path", null); }
public static void setMencoderInPref(final String _path) { BuPreferences.BU.putStringProperty("mencoder.path", _path); }
/** * Renvoie <code>true</code> si les astuces sont declares comme visibles au demarrage dans les preferences * <code>_options</code>. */ public static boolean isAstucesVisibles(final BuPreferences _options) { return _options.getBooleanProperty(ASTUCES_VISIBLES_PREF, true); }
public void setDefaultSize(int _v) { if(_v<=0) BuPreferences.BU.removeProperty("icons.size"); else BuPreferences.BU.putIntegerProperty("icons.size",_v); }
/** * Modifie la valeur concernant l'apparition automatique des astuces au demarrage de l'application. */ public static void setAstucesVisibles(final BuPreferences _options, final boolean _b) { _options.putBooleanProperty(ASTUCES_VISIBLES_PREF, _b); _options.writeIniFile(); }
public Font getFontProperty(String _key, Font _default) { String s = getStringProperty(_key); Font r = createFontFromString(_default, s); return r; }
/** * Enregistre les preferences dans FudaaPreferences mais n'ecrit pas le fichier de pref. */ public void saveFavorites() { final int nb = BuPreferences.BU.getIntegerProperty(PREF_NB, -1); if (nb < 0) { for (final Enumeration e = BuPreferences.BU.keys(); e.hasMoreElements();) { final String k = (String) e.nextElement(); if (k.startsWith(PREF_ID)) { BuPreferences.BU.removeProperty(k); } } } else { for (int i = 1; i <= nb; i++) { BuPreferences.BU.removeProperty(PREF_ID + i + SUF_ID); } } final int n = list_.size(); int idxN = 0; for (int i = 0; i < n; i++) { final String key = PREF_ID + CtuluLibString.getString(idxN + 1) + SUF_ID; final String val = (String) list_.get(i); final File f = new File(val); if (f.exists() && f.isDirectory()) { BuPreferences.BU.putStringProperty(key, val); idxN++; } } BuPreferences.BU.putIntegerProperty(PREF_NB, idxN); }
private void loadFavorites() { list_ = new ArrayList(20); final int nb = BuPreferences.BU.getIntegerProperty(PREF_NB, -1); if (nb < 0) { for (final Enumeration e = BuPreferences.BU.keys(); e.hasMoreElements();) { final String k = (String) e.nextElement(); if (k.startsWith(PREF_ID)) { String val = BuPreferences.BU.getStringProperty(k, null); if (val != null) { val = val.trim(); final File f = new File(val); if ((val.length() == 0) || (!f.exists()) || (!f.isDirectory())) { BuPreferences.BU.removeProperty(k); } else { list_.add(val); String val = BuPreferences.BU.getStringProperty(k, null); if (val != null) { val = val.trim(); final File f = new File(val); if ((val.length() == 0) || (!f.exists()) || (!f.isDirectory())) { BuPreferences.BU.removeProperty(k); } else { list_.add(val);
private void fillTable() { for(int i=0;i<NBL;i++) if(cbLangues_[i].isSelected()) options_.putStringProperty("locale.language",CODES[i]); options_.putBooleanProperty ("translation.fallBackOnEnglish",cbFallBack_.isSelected()); setDirty(false); }
private void fillTable() { int type=1; String exec=""; if(cbInterne_.isSelected()) { type=1; exec=options_.getStringProperty("browser.exec"); } if(cbExterne_.isSelected()) { type=2; exec=(String)chBrowser_.getSelectedItem(); } if(cbPerso_.isSelected()) { type=3; exec=tfPerso_.getText(); } options_.putIntegerProperty("browser.type",type); options_.putStringProperty ("browser.exec",exec); setDirty(false); }
PREF.putStringProperty(prefixe + EXE, getExecCommand()); String s = getIconURL(); if (s != null) { PREF.putStringProperty(prefixe + ICON, s); } else { PREF.removeProperty(prefixe + ICON); PREF.putStringProperty(prefixe + NAME, s); } else { PREF.removeProperty(prefixe + NAME); PREF.putStringProperty(prefixe + ARGS, s); } else { PREF.removeProperty(prefixe + ARGS); PREF.putBooleanProperty(prefixe + BATCH, true); } else { PREF.removeProperty(prefixe + BATCH);
public void writePref() { FudaaExec.PREF.writeIniFile(); }
/** * @param _name la nom de la derniere palette discontinue utilisee. */ public void setLastChoosePaletteName(final String _name){ if (_name == null) { getPref().removeProperty(getLastPalettePrefKey()); } else{ getPref().putStringProperty(getLastPalettePrefKey(), _name); } savePref(); }
private void updateComponents() { tfDirOpen_.setText(options_.getStringProperty("directory.open")); tfDirSave_.setText(options_.getStringProperty("directory.save")); chWinSize_.setSelectedIndex(options_.getIntegerProperty("window.size")); setDirty(false); }
private void updateComponents() { String l=options_.getStringProperty("locale.language"); for(int i=0;i<NBL;i++) if(l.startsWith(CODES[i])) cbLangues_[i].setSelected(true); cbFallBack_.setSelected (options_.getBooleanProperty("translation.fallBackOnEnglish", FuResource.isDefaultToEnglish())); setDirty(false); } }
private void fillTable() { options_.putStringProperty("directory.open",tfDirOpen_.getText()); options_.putStringProperty("directory.save",tfDirSave_.getText()); options_.putIntegerProperty ("window.size",chWinSize_.getSelectedIndex()); setDirty(false); }
public void exit() { if (confirmExit()) { if (BuPreferences.BU.getIntegerProperty("window.size") == 2) { Point p = getLocation(); Dimension d = getSize(); BuPreferences.BU.putIntegerProperty("window.x", p.x); BuPreferences.BU.putIntegerProperty("window.y", p.y); BuPreferences.BU.putIntegerProperty("window.w", d.width); BuPreferences.BU.putIntegerProperty("window.h", d.height); } BuPreferences.BU.writeIniFile(); // if(DEBUG) // FuLog.debug("BAN: try to unregister with "+BuRegistry.getInstance()); BuRegistry.unregister(this); // if(FuLib.isJDistroRunning()) // System.exit(0); } // else if(DEBUG) FuLog.debug("BAN: exit *NOT* confirmed"); }
private Map loadPaletteFromPref(){ final BuPreferences pref = getPref(); final String prefix = getPrefPrefix(); final Map m = new HashMap(); for (final Enumeration e = pref.keys(); e.hasMoreElements();) { final String key = (String) e.nextElement(); if (key.startsWith(prefix)) { final String name = key.substring(prefix.length()); if (!m.containsKey(name)) { final Color[] cs = loadColor(pref.getStringProperty(key, null)); if (cs != null) { m.put(name, new PaletteCouleurDiscontinu(cs, name)); } } } } return m; }
public void putFontProperty(String _key, Font _font) { putStringProperty(_key, getStringValue(_font)); }
bp.setDots(!bp.isDots()); } else if (action.equals("MAGNETISME")) { BuPreferences.BU.putBooleanProperty("desktop.snap", !BuPreferences.BU.getBooleanProperty("desktop.snap", false)); } else if (action.equals("DESKTOP_UNIFORME")) { if (BuLib.getUIBoolean("Desktop.textureAlwaysUsed")) bp.setIcon(null); else bp.setIcon(BuLib.filter(new BuIcon(BuPreferences.BU.getTexture(Integer.parseInt(action.substring(15)))))); } else if (action.equals("DESKTOP_ROUGE")) { setBackground(new ColorUIResource(BuLib.getColor(new Color(128, 64, 64))));