localpreferences.java
来自「开源项目openfire的完整源程序」· Java 代码 · 共 676 行 · 第 1/2 页
JAVA
676 行
return getBoolean("hostAndPort", false);
}
public void setHostAndPortConfigured(boolean configured) {
setBoolean("hostAndPort", configured);
}
public String getResource() {
return props.getProperty("resource", "spark");
}
public void setResource(String resource) {
props.setProperty("resource", resource);
}
public boolean isStartedHidden() {
return getBoolean("startHidden", false);
}
public void setStartedHidden(boolean startedHidden) {
setBoolean("startHidden", startedHidden);
}
public boolean isTimeDisplayedInChat() {
return getBoolean("timeDisplayed", true);
}
public void setTimeDisplayedInChat(boolean timeDisplayedInChat) {
setBoolean("timeDisplayed", timeDisplayedInChat);
}
public boolean isSpellCheckerEnabled() {
return getBoolean("spellCheckerEnabled", true);
}
public void setSpellCheckerEnabled(boolean enabled) {
setBoolean("spellCheckerEnabled", enabled);
}
public boolean isChatRoomNotificationsOn() {
return getBoolean("chatNotificationOn", true);
}
public void setChatRoomNotifications(boolean on) {
setBoolean("chatNotificationOn", on);
}
public boolean isChatHistoryEnabled() {
return getBoolean("showHistory", true);
}
public void setChatHistoryEnabled(boolean hideChatHistory) {
setBoolean("showHistory", hideChatHistory);
}
public boolean isEmptyGroupsShown() {
return getBoolean("showEmptyGroups", false);
}
public void setEmptyGroupsShown(boolean shown) {
setBoolean("showEmptyGroups", shown);
}
public int getFileTransferTimeout() {
return Integer.parseInt(props.getProperty("fileTransferTimeout", "30"));
}
public void setFileTransferTimeout(int minutes) {
props.setProperty("fileTransferTimeout", Integer.toString(minutes));
}
public void setChatLengthDefaultTimeout(int minutes) {
props.setProperty("defaultChatLengthTimeout", Integer.toString(minutes));
}
public int getChatLengthDefaultTimeout() {
return Integer.parseInt(props.getProperty("defaultChatLengthTimeout", "15"));
}
public void setNickname(String nickname) {
props.setProperty("nickname", nickname);
}
public String getNickname() {
return props.getProperty("nickname", SparkManager.getUserManager().getNickname());
}
public void setShowToasterPopup(boolean show) {
setBoolean("toasterPopup", show);
}
public boolean getShowToasterPopup() {
return getBoolean("toasterPopup", false);
}
public void setWindowTakesFocus(boolean focus) {
setBoolean("windowTakesFocus", focus);
}
public boolean getWindowTakesFocus() {
return getBoolean("windowTakesFocus", false);
}
public void setStartOnStartup(boolean startup) {
setBoolean("startOnStartup", startup);
}
public boolean getStartOnStartup() {
return getBoolean("startOnStartup", false);
}
public void setCompressionEnabled(boolean on) {
setBoolean("compressionOn", on);
}
public boolean isCompressionEnabled() {
return getBoolean("compressionOn", false);
}
public void setTheme(String theme) {
props.setProperty("theme", theme);
}
public String getTheme() {
return props.getProperty("theme", "Default");
}
public void setEmoticonPack(String pack) {
props.setProperty("emoticonPack", pack);
}
public String getEmoticonPack() {
return props.getProperty("emoticonPack", "Default");
}
public void setOfflineNotifications(boolean notify) {
setBoolean("notifyOnOffline", notify);
}
public boolean isOfflineNotificationsOn() {
return getBoolean("notifyOnOffline", false);
}
public void setOnlineNotifications(boolean notify) {
setBoolean("notifyOnOnline", notify);
}
public boolean isOnlineNotificationsOn() {
return getBoolean("notifyOnOnline", false);
}
public void setDockingEnabled(boolean dockingEnabled) {
setBoolean("dockingEnabled", dockingEnabled);
}
public boolean isDockingEnabled() {
return getBoolean("dockingEnabled", false);
}
public void setAutoCloseChatRoomsEnabled(boolean autoCloseChatRoomsEnabled) {
setBoolean("autoCloseChatRoomsEnabled", autoCloseChatRoomsEnabled);
}
public boolean isAutoCloseChatRoomsEnabled() {
return getBoolean("autoCloseChatRoomsEnabled", true);
}
public void setTabsOnTop(boolean onTop) {
setBoolean("tabsOnTop", onTop);
}
public boolean isTabTopPosition() {
return getBoolean("tabsOnTop", true);
}
public void setBuzzEnabled(boolean enabled) {
setBoolean("buzzEnabled", enabled);
}
public boolean isBuzzEnabled() {
return getBoolean("buzzEnabled", true);
}
public void setOfflineGroupVisible(boolean visible) {
setBoolean("offlineGroupVisible", visible);
}
public boolean isOfflineGroupVisible() {
return getBoolean("offlineGroupVisible", true);
}
public void setEmoticonsEnabled(boolean enabled) {
setBoolean("emoticonsEnabled", enabled);
}
public boolean areEmoticonsEnabled() {
return getBoolean("emoticonsEnabled", true);
}
public void setUseSystemLookAndFeel(boolean sysLAF) {
setBoolean("useSystemLookAndFeel", sysLAF);
}
public boolean useSystemLookAndFeel() {
return getBoolean("useSystemLookAndFeel", false);
}
public void setCheckForBeta(boolean checkForBeta) {
setBoolean("checkForBeta", checkForBeta);
}
public boolean isBetaCheckingEnabled() {
return getBoolean("checkForBeta", false);
}
public void setSSOEnabled(boolean enabled) {
setBoolean("ssoEnabled", enabled);
}
public boolean isSSOEnabled() {
return getBoolean("ssoEnabled", false);
}
public void setSSOAdv(boolean enabled) {
setBoolean("ssoAdv", enabled);
}
public boolean getSSOAdv() {
return getBoolean("ssoAdv", false);
}
public void setSSOMethod(String method) {
props.setProperty("ssoMethod", method);
}
public String getSSOMethod() {
return props.getProperty("ssoMethod");
}
public void setSSORealm(String realm) {
props.setProperty("ssoRealm", realm);
}
public String getSSORealm() {
return props.getProperty("ssoRealm");
}
public void setSSOKDC(String kdc) {
props.setProperty("ssoKDC", kdc);
}
public String getSSOKDC() {
return props.getProperty("ssoKDC");
}
public boolean getDebug() {
return getBoolean("debug", false);
}
public void setDebug(boolean debug) {
setBoolean("debug", debug);
}
public void setDebuggerEnabled(boolean enabled) {
setBoolean("debuggerEnabled", enabled);
}
public boolean isDebuggerEnabled() {
return getBoolean("debuggerEnabled", false);
}
public void setContactListFontSize(int fontSize) {
setInt("contactListFontSize", fontSize);
}
public int getContactListFontSize() {
return getInt("contactListFontSize", 11);
}
public void setContactListIconSize(int iconSize) {
setInt("contactListIconSize", iconSize);
}
public int getContactListIconSize() {
return getInt("contactListIconSize", 24);
}
public void setChatRoomFontSize(int fontSize) {
setInt("chatRoomFontSize", fontSize);
}
public int getChatRoomFontSize() {
return getInt("chatRoomFontSize", 12);
}
public void setPerisitedChatRoomsClosable(boolean closable) {
setBoolean("perisitedChatRoomsClosable", closable);
}
public boolean arePerisitedChatRoomsClosable() {
return getBoolean("perisitedChatRoomsClosable", true);
}
public void setLanguage(String language) {
props.setProperty("language", language);
}
public String getLanguage() {
return props.getProperty("language", "");
}
public void setAvatarVisible(boolean visible) {
setBoolean("showAvatar", visible);
}
public boolean areAvatarsVisible() {
return getBoolean("showAvatar", false);
}
private boolean getBoolean(String property, boolean defaultValue) {
return Boolean.parseBoolean(props.getProperty(property, Boolean.toString(defaultValue)));
}
private void setBoolean(String property, boolean value) {
props.setProperty(property, Boolean.toString(value));
}
private int getInt(String property, int defaultValue) {
return Integer.parseInt(props.getProperty(property, Integer.toString(defaultValue)));
}
private void setInt(String property, int value) {
props.setProperty(property, Integer.toString(value));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?