public static String getMencoderInPref() { return BuPreferences.BU.getStringProperty("mencoder.path", null); }
public Color getColorProperty(String _key, Color _default) { String s = getStringProperty(_key); Color r = _default; if (s != null) { try { r = new Color(Integer.parseInt(s, 16)); } catch (Exception ex) {} } return r; }
private String author() { String r=BuPreferences.BU.getStringProperty("user.lastname",null); if(r!=null) { String n=BuPreferences.BU.getStringProperty("user.firstname",null); if(n!=null) r+=" "+n; } else { String u=FuLib.getSystemProperty("user.name"); if(u==null) r=""; else r=u.toUpperCase(); } return r; }
private void updateComponents() { tfDir_.setText(options_.getStringProperty("script.directory")); tfInt_.setText(options_.getStringProperty("script.interpreters","Acto,Foo,-,Dawn,Fiji,Python,Silk")); }
private String email() { String r=BuPreferences.BU.getStringProperty("user.email",null); if(r==null) { try { r=InetAddress.getLocalHost().getHostName(); } catch(UnknownHostException ex) { r="localhost"; } String u=FuLib.getSystemProperty("user.name"); if(u==null) u="root"; r=u+"@"+r; } return r; }
/** * @return le dernier dossier visite selon la pref PREF_LAST */ public static String getLastDirPath() { return BuPreferences.BU.getStringProperty(CtuluFavoriteFiles.PREF_LAST, FuLib.getUserHome()); }
public Font getFontProperty(String _key, Font _default) { String s = getStringProperty(_key); Font r = createFontFromString(_default, s); return r; }
/** * Retourne le nombre d'astuces. * * @return La valeur NombreLigne */ public int getNombreLigne() { String temp = (getPrefs().getStringProperty(NOM_VARIABLE)).trim(); if ((temp == null) || (temp.length() == 0) || ("0".equals(temp))) { lecture(0); temp = getPrefs().getStringProperty(NOM_VARIABLE); } return Integer.parseInt(temp); }
public static FudaaExec loadFromPref(final String _name) { final String prefixe = DodicoPreferences.buildPrefKey(KEY_PREFIXE, _name, true); String exe = PREF.getStringProperty(prefixe + EXE, null); if (exe == null) { return null; } final String ico = PREF.getStringProperty(prefixe + ICON, "(intern)appli/" + _name); final FudaaExec r = new FudaaExec(_name, exe, ico); exe = PREF.getStringProperty(prefixe + NAME, null); if (exe != null) { r.setShownName(exe); } r.reloadFromPref(); return r; }
private void updateComponents() { liGenDeskDecor_.setSelectedItem(optionsStr_.get(options_.getStringProperty("desktop.decor", getDesktopUniforme()))); liGenDeskTexture_.setSelectedItem(optionsStr_ .get(options_.getStringProperty("desktop.texture", "DESKTOP_TEXTURE1"))); liGenDeskCouleur_.setSelectedItem(optionsStr_.get(options_.getStringProperty("desktop.background", getDesktopDefault()))); liGenAspAspect_.setSelectedItem(optionsStr_.get(options_.getStringProperty("lookandfeel.name", "ASPECT_DEFAUT"))); updateAbility(); setDirty(false); }
public BuInformationsDocument(BuIcon _logo) { name ="Document"; version =""; date =FuLib.date(); organization=BuPreferences.BU.getStringProperty("user.organization"); department =BuPreferences.BU.getStringProperty("user.department"); author =author(); contact =email(); logo =_logo; location =""; mimetype =""; comment =""; data =null; }
public void reloadFromPref() { final String prefixe = DodicoPreferences.buildPrefKey(KEY_PREFIXE, getIDName(), true); String s = PREF.getStringProperty(prefixe + EXE, null); if (s != null) { setExecCommand(s); } s = PREF.getStringProperty(prefixe + ICON, null); if (s != null) { setIconURL(s); } s = PREF.getStringProperty(prefixe + NAME, null); if (s != null) { setShownName(s); } batchMode_ = PREF.getBooleanProperty(prefixe + BATCH, false); args_ = PREF.getStringProperty(prefixe + ARGS, null); }
private void reload() { final String exeList = prefAppli_.getStringProperty(getKeyForList(), null); if (exeList == null) { actions_ = null; } else { final StringTokenizer tk = new StringTokenizer(exeList, CtuluLibString.VIR); final int n = tk.countTokens(); actions_ = new ArrayList(n); if (execMng_ == null) { execMng_ = new FudaaGlobalExecManager(); } for (int i = 0; i < n; i++) { actions_.add(execMng_.getFudaaExec(tk.nextToken())); } } }
/** * @return le nom de la derniere palette selectionnee. null si continue */ public String getLastChoosePaletteName(){ return getPref().getStringProperty(getLastPalettePrefKey(), null); }
private void updateComponents() { for(int i=0;i<NB;i++) text_[i].setText(options_.getStringProperty("user."+PROP[i])); setDirty(false); } }
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; }
private void updateComponents() { tfDirOpen_.setText(options_.getStringProperty("directory.open")); tfDirSave_.setText(options_.getStringProperty("directory.save")); chWinSize_.setSelectedIndex(options_.getIntegerProperty("window.size")); setDirty(false); }
public Image getTexture(int _num) { String url = BuPreferences.BU.getStringProperty("desktop.image." + _num); Image img = null; if (!"".equals(url.trim())) { BuIcon icon = new BuIcon(url); if (!icon.isDefault()) img = icon.getImage(); } if (img == null) { img = BuResource.BU.getImage("background_desktop_" + _num); } return img; }
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 final void step3() { BuInformationsSoftware il=DjaImplementation.informationsSoftware(); if(BuPreferences.BU.getStringProperty("locale.language").equals("")) { BuLanguagePreferencesPanel pp= new BuLanguagePreferencesPanel(il.languages); new BuDialogMessage(null,il,pp).activate(); pp.validatePreferences(); Locale.setDefault(new Locale(pp.getLocaleString(),"")); } BuPreferences.BU.applyLanguage(il.languages); }