com.hipipal.texteditor.common
Class Settings

java.lang.Object
  extended by com.hipipal.texteditor.common.Settings
All Implemented Interfaces:
Constants

public class Settings
extends java.lang.Object
implements Constants


Field Summary
static boolean AUTO_SAVE_OVERWRITE
           
static boolean BACK_BTN_AS_UNDO
          Use back button as undo
static int COLOR
          color setting
static int DEFAULT_END_OF_LINE
          Default end of line
static java.lang.String ENCODING
          Encoding
static int END_OF_LINE
          End Of Line style
static boolean FLING_TO_SCROLL
          enable fling to scroll
static boolean FORCE_AUTO_SAVE
          Let auto save on quit be triggered
static java.lang.String HOME_PAGE_PATH
          Home Page Path
static int MAX_RECENT_FILES
          Number of recent files to remember
static boolean SEARCHMATCHCASE
          only search for matchin case
static boolean SEARCHWRAP
          when search reaches the end of a file, search wrap
static boolean SHOW_LINE_NUMBERS
          Show the lines numbers
static int TEXT_SIZE
          Text size setting
static boolean UNDO
          Use Undo instead of quit ?
static int UNDO_MAX_STACK
          Undo stack capacity
static boolean USE_HOME_PAGE
          Use a Home Page
static boolean WORDWRAP
          automatic break line to fit one page
 
Fields inherited from interface com.hipipal.texteditor.common.Constants
ACTION_WIDGET_OPEN, BACKUP_FILE_NAME, COLOR_CLASSIC, COLOR_DRACULA, COLOR_MATRIX, COLOR_NEGATIVE, COLOR_SKY, ENC_ASCII, ENC_LATIN, ENC_UTF8, EOL_LINUX, EOL_MAC, EOL_WINDOWS, EXTRA_FORCE_READ_ONLY, EXTRA_REQUEST_CODE, FONT_FILE_NAME, FONT_FOLDER_NAME, MENU_ID_ABOUT, MENU_ID_NEW, MENU_ID_OPEN, MENU_ID_OPEN_RECENT, MENU_ID_QUIT, MENU_ID_REDO, MENU_ID_SAVE, MENU_ID_SAVE_AS, MENU_ID_SEARCH, MENU_ID_SETTINGS, MENU_ID_UNDO, PREFERENCE_ALLOW_UNDO, PREFERENCE_AUTO_SAVE, PREFERENCE_AUTO_SAVE_OVERWRITE, PREFERENCE_BACK_BUTTON_AS_UNDO, PREFERENCE_COLOR_THEME, PREFERENCE_ENCODING, PREFERENCE_END_OF_LINES, PREFERENCE_FLING_TO_SCROLL, PREFERENCE_FONT, PREFERENCE_HIGHLIGHT, PREFERENCE_HOME_PAGE_PATH, PREFERENCE_MAX_RECENTS, PREFERENCE_MAX_UNDO_STACK, PREFERENCE_RECENTS, PREFERENCE_SEARCH_MATCH_CASE, PREFERENCE_SEARCHWRAP, PREFERENCE_SELECT_FONT, PREFERENCE_SHOW_LINE_NUMBERS, PREFERENCE_TEXT_SIZE, PREFERENCE_USE_HOME_PAGE, PREFERENCE_WORDWRAP, PREFERENCES_NAME, REQUEST_FONT, REQUEST_HOME_PAGE, REQUEST_OPEN, REQUEST_RECENT, REQUEST_SAVE_AS, RESULT_ERROR, STORAGE, STORAGE_PATH, TAG, TEXT_SIZE_MAX, TEXT_SIZE_MIN
 
Constructor Summary
Settings()
           
 
Method Summary
static java.lang.String getEndOfLine()
           
static java.io.File getFontFile(android.content.Context ctx)
           
static android.graphics.Typeface getTypeface(android.content.Context ctx)
           
static void saveHomePage(android.content.SharedPreferences settings)
          Save the Home page settings
static void updateFromPreferences(android.content.SharedPreferences settings)
          Update the settings from the given SharedPreferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_RECENT_FILES

public static int MAX_RECENT_FILES
Number of recent files to remember


SHOW_LINE_NUMBERS

public static boolean SHOW_LINE_NUMBERS
Show the lines numbers


WORDWRAP

public static boolean WORDWRAP
automatic break line to fit one page


COLOR

public static int COLOR
color setting


SEARCHWRAP

public static boolean SEARCHWRAP
when search reaches the end of a file, search wrap


SEARCHMATCHCASE

public static boolean SEARCHMATCHCASE
only search for matchin case


TEXT_SIZE

public static int TEXT_SIZE
Text size setting


DEFAULT_END_OF_LINE

public static int DEFAULT_END_OF_LINE
Default end of line


END_OF_LINE

public static int END_OF_LINE
End Of Line style


ENCODING

public static java.lang.String ENCODING
Encoding


FORCE_AUTO_SAVE

public static boolean FORCE_AUTO_SAVE
Let auto save on quit be triggered


AUTO_SAVE_OVERWRITE

public static boolean AUTO_SAVE_OVERWRITE

FLING_TO_SCROLL

public static boolean FLING_TO_SCROLL
enable fling to scroll


UNDO

public static boolean UNDO
Use Undo instead of quit ?


UNDO_MAX_STACK

public static int UNDO_MAX_STACK
Undo stack capacity


BACK_BTN_AS_UNDO

public static boolean BACK_BTN_AS_UNDO
Use back button as undo


USE_HOME_PAGE

public static boolean USE_HOME_PAGE
Use a Home Page


HOME_PAGE_PATH

public static java.lang.String HOME_PAGE_PATH
Home Page Path

Constructor Detail

Settings

public Settings()
Method Detail

getEndOfLine

public static java.lang.String getEndOfLine()
Returns:
the end of line characters according to the current settings

updateFromPreferences

public static void updateFromPreferences(android.content.SharedPreferences settings)
Update the settings from the given SharedPreferences

Parameters:
settings - the settings to read from

saveHomePage

public static void saveHomePage(android.content.SharedPreferences settings)
Save the Home page settings

Parameters:
settings - the settings to write to

getFontFile

public static java.io.File getFontFile(android.content.Context ctx)

getTypeface

public static android.graphics.Typeface getTypeface(android.content.Context ctx)