Class WindowsUtils

java.lang.Object
be.gaudry.model.system.WindowsUtils

public class WindowsUtils extends Object
Interacts with a Windows platform to provide some features The availability of all these features may be tested before by a isWindowsPlatform() call. Provided by the broldev.core.model project.
Since:
1.0 Mar 20, 2009, broldev.core.model 0.0.1-SNAPSHOT dependency
Version:
1.0 Mar 20, 2009
Author:
Steph GAUDRY
  • Method Details

    • isWindowsPlatform

      public static boolean isWindowsPlatform()
      Checks if the operating system is included into the Windows family. It's better to call this method before calling any other method of this class to avoid throwing an UnsupportedOperationException
      Returns:
      true if this is a Windows OS
    • showAddPrinterDialog

      public static void showAddPrinterDialog()
      Shows the Windows Add Printer Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showConnectToPrinterDialog

      public static void showConnectToPrinterDialog()
      Shows the Windows Connect to Printer Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showMapNetworkDriveDialog

      public static void showMapNetworkDriveDialog()
      Shows the Windows Map Network Drive Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showDisconnectNetworkDriveDialog

      public static void showDisconnectNetworkDriveDialog()
      Shows the Windows Disconnect Network Drive Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showFormatDiskDialog

      public static void showFormatDiskDialog()
      Shows the Windows Format Disk Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showControlPanel

      public static void showControlPanel()
      Shows the Windows Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showControlPanelAccessibilityOptions

      public static void showControlPanelAccessibilityOptions()
      Shows the Windows Accessibility Options Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showAddRemoveProgram

      public static void showAddRemoveProgram()
      Shows the Windows Add Remove Programs Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showWindowsThemes

      public static void showWindowsThemes()
      Shows the Windows Themes Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showJoystickSettings

      public static void showJoystickSettings()
      Shows the Windows Joystick Settings Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showAutomaticUpdates

      public static void showAutomaticUpdates()
      Shows the Windows Automatic Updates Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showDateTimeProperties

      public static void showDateTimeProperties()
      Shows the Windows Date and Time Properties Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showComputerProperties

      public static void showComputerProperties()
      Shows the Windows Computer Properties Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showNetworkConnections

      public static void showNetworkConnections()
      Shows the Windows Network Connections Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showNetworkSetupWizard

      public static void showNetworkSetupWizard()
      Shows the Windows Network Setup Wizard Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showODBCDataSourceAdministrator

      public static void showODBCDataSourceAdministrator()
      Shows the Windows ODBC Data Source Administrator Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openFontsFolder

      public static void openFontsFolder()
      Open the Fonts folder
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showPhoneAndModemOptions

      public static void showPhoneAndModemOptions()
      Shows the Windows Phone and Modem Options Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showPowerOptionsProperties

      public static void showPowerOptionsProperties()
      Shows the Windows Power Options Properties Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showPrintersAndFaxes

      public static void showPrintersAndFaxes()
      Shows the Windows Printers and Faxes Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showRegionalOptions

      public static void showRegionalOptions()
      Shows the Windows Regional Options Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showSoundAndAudioDevices

      public static void showSoundAndAudioDevices()
      Shows the Windows Sound and Audio Devices Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showJavaControlPanel

      public static void showJavaControlPanel()
      Shows the Windows Sun Java Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showSystemControlPanel

      public static void showSystemControlPanel()
      Shows the Windows System Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showUserAccounts

      public static void showUserAccounts()
      Shows the Windows User Accounts Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showWindowsFirewall

      public static void showWindowsFirewall()
      Shows the Windows Windows Firewall Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showWindowsSecurityCenter

      public static void showWindowsSecurityCenter()
      Shows the Windows Windows Security Center Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showDisplayPropsDesktop

      public static void showDisplayPropsDesktop()
      Shows the Windows Display Properties (Desktop Tab) Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showTaskbarAndStartMenuDialog

      public static void showTaskbarAndStartMenuDialog()
      Shows the Windows Taskbar and Start Menu Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showFolderOptionsDialog

      public static void showFolderOptionsDialog()
      Shows the Windows Folder Options Dialog
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showDisplayPropsScreenSaver

      public static void showDisplayPropsScreenSaver()
      Shows the Windows Display Properties (Screen Saver) Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showDisplayPropsAppearance

      public static void showDisplayPropsAppearance()
      Shows the Windows Display Properties (Appearance Tab) Control Panel Applet
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showOrganizeFavouritesDialog

      public static void showOrganizeFavouritesDialog()
      opens the dialog box for editing the Favorites in Internet Explorer
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • showProcessesFor

      public static void showProcessesFor(String execName)
      The Windows XP tool Tasklist can be used to determine what program modules
      Parameters:
      execName - name of the executable
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family are currently being executed by the given parameter
    • showTaskList

      public static void showTaskList()
      Calls the Basic Tasklist command
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • open

      public static void open(File file)
      Calls the default program to open the file
      Parameters:
      file - that we want to open with default application
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openWith

      public static void openWith(File file)
      Calls the Windows Open With... Dialog to select a program to open the file
      Parameters:
      file - that we want to open with a selectable application
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openMyMusic

      public static void openMyMusic()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openMyDocuments

      public static void openMyDocuments()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openMyPictures

      public static void openMyPictures()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openMyVideos

      public static void openMyVideos()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openConnectionsFolder

      public static void openConnectionsFolder()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openCookies

      public static void openCookies()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openDownloads

      public static void openDownloads()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openFavorites

      public static void openFavorites()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openMyGames

      public static void openMyGames()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openMyComputerFolder

      public static void openMyComputerFolder()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openPlaylists

      public static void openPlaylists()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openPrintersFolder

      public static void openPrintersFolder()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openProfile

      public static void openProfile()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openProgramFiles

      public static void openProgramFiles()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openRecent

      public static void openRecent()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • openSavedGames

      public static void openSavedGames()
      Calls the start shell command to open a directory
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • launchProperties

      public static void launchProperties(File file)
      Opens the "File properties" dialog
      Parameters:
      file - that we want to show the properties
      Throws:
      UnsupportedOperationException - if the operating system is not included into the Windows family
    • getProcesses

      public static List<String> getProcesses()
      Returns the running processes list See the logging information to know how the logging is implemented.
      Returns:
      a list of running processes