2022-12-18 22:20:21 +00:00
# Class I2PBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java)
> */
Access: public
Description:
> I2PBrowser.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @description I2PBrowser is a that is used to open a browser window to the I2P network. It automatically detects the operating system and available browsers and selects the best one to use with Tor Browser at the top for Firefox and Brave at the top for Chrome.
Author: idk
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
< details >
< summary >
Show dependencies
< / summary >
< ul >
2022-12-22 22:09:00 +00:00
< li > java.awt.AWTException< / li >
< li > java.awt.Component< / li >
2022-12-18 22:20:21 +00:00
< li > java.awt.Image< / li >
< li > java.awt.Menu< / li >
< li > java.awt.MenuItem< / li >
< li > java.awt.PopupMenu< / li >
< li > java.awt.SystemTray< / li >
< li > java.awt.Toolkit< / li >
< li > java.awt.TrayIcon< / li >
< li > java.awt.event.ActionEvent< / li >
< li > java.awt.event.ActionListener< / li >
2022-12-22 22:09:00 +00:00
< li > java.awt.event.MouseAdapter< / li >
< li > java.awt.event.MouseEvent< / li >
< li > java.awt.event.MouseListener< / li >
2022-12-18 22:20:21 +00:00
< li > java.io.File< / li >
< li > java.io.FileOutputStream< / li >
< li > java.io.FileWriter< / li >
< li > java.io.IOException< / li >
< li > java.io.InputStream< / li >
< li > java.io.OutputStream< / li >
< li > java.util.ArrayList< / li >
< li > java.util.Arrays< / li >
< / ul >
< / details >
## Member Variables
#### I2PFirefox i2pFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### I2PChromium i2pChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### I2PGenericUnsafeBrowser i2pGeneral [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
2022-12-22 22:09:00 +00:00
#### Toolkit toolkit [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
2022-12-19 02:55:22 +00:00
#### SystemTray tray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
2022-12-22 22:09:00 +00:00
#### Image image [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
2022-12-19 02:55:22 +00:00
#### TrayIcon icon [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### PopupMenu menu [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
2022-12-22 22:09:00 +00:00
#### Menu submenuStrict [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### MenuItem launchRegularBrowserStrict [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### MenuItem launchPrivateBrowserStrict [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### Menu submenuUsability [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### MenuItem launchRegularBrowserUsability [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### MenuItem launchPrivateBrowserUsability [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### MenuItem launchConfigBrowserUsability [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
#### MenuItem closeItem [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: final
2022-12-18 22:20:21 +00:00
#### boolean firefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: public
#### boolean chromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: public
#### boolean generic [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: public
#### boolean chromiumFirst [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: public
#### boolean usability [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: public
2022-12-19 02:55:22 +00:00
#### int privateBrowsing [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: public
2022-12-18 22:20:21 +00:00
#### boolean outputConfig [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: static
#### boolean useSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
>
+ Access: private
+ Modifiers: static
## Methods
2022-12-22 22:09:00 +00:00
### launchFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L78)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: private
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindow | int | |
| url | String[] | |
2022-12-22 22:09:00 +00:00
### launchChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L85)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: private
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindow | int | |
| url | String[] | |
2022-12-22 22:09:00 +00:00
### launchGeneric [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L92)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: private
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindowInt | int | |
| url | String[] | |
2022-12-22 22:09:00 +00:00
### setBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L121)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| browserPath | String | |
2022-12-22 22:09:00 +00:00
### hasChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L131)
2022-12-18 22:20:21 +00:00
+ Description: Return true if there is a Chromium available
+ Access: public
+ return: true if Chromium is available false otherwise
This method has no parameters.
2022-12-22 22:09:00 +00:00
### hasFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L148)
2022-12-18 22:20:21 +00:00
+ Description: Return true if there is a Firefox variant available
+ Access: public
+ return: true if Firefox variant is available false otherwise
This method has no parameters.
2022-12-22 22:09:00 +00:00
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L168)
2022-12-18 22:20:21 +00:00
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory.
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindow | int | |
| url | String[] | |
2022-12-22 22:09:00 +00:00
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L213)
2022-12-18 22:20:21 +00:00
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory.
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindow | boolean | |
2022-12-22 22:09:00 +00:00
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L227)
2022-12-18 22:20:21 +00:00
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory.
+ Access: public
+ return: void
This method has no parameters.
2022-12-22 22:09:00 +00:00
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L229)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| inUrl | String | |
2022-12-22 22:09:00 +00:00
### main [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L239)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
2022-12-22 22:09:00 +00:00
### parseArgs [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L243)
2022-12-18 22:20:21 +00:00
+ Description:
2022-12-19 02:55:22 +00:00
+ Access: public
+ return: ArrayList< String >
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
2022-12-22 22:09:00 +00:00
### startup [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L290)
2022-12-19 02:55:22 +00:00
+ Description:
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
2022-12-22 22:09:00 +00:00
### createSystrayRunningFile [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L309)
2022-12-19 02:55:22 +00:00
+ Description:
+ Access: protected
2022-12-18 22:20:21 +00:00
+ Modifiers: static
+ return: boolean
This method has no parameters.
2022-12-22 22:09:00 +00:00
### systrayRunningExternally [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L325)
2022-12-18 22:20:21 +00:00
+ Description:
2022-12-19 02:55:22 +00:00
+ Access: protected
2022-12-22 22:09:00 +00:00
+ Modifiers: static
+ return: boolean
2022-12-18 22:20:21 +00:00
This method has no parameters.
2022-12-22 22:09:00 +00:00
### initTray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L336)
2022-12-19 02:55:22 +00:00
+ Description:
+ Access: private
+ return: SystemTray
This method has no parameters.
2022-12-22 22:09:00 +00:00
### initMenu [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L347)
2022-12-19 02:55:22 +00:00
+ Description:
+ Access: private
+ return: PopupMenu
This method has no parameters.
2022-12-22 22:09:00 +00:00
### initIconFile [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L352)
+ Description:
+ Access: private
+ return: File
This method has no parameters.
### initIcon [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L366)
2022-12-19 02:55:22 +00:00
+ Description:
+ Access: private
+ return: TrayIcon
This method has no parameters.
2022-12-22 22:09:00 +00:00
### startupSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L379)
+ Description:
+ Access: protected
+ return: void
This method has no parameters.
### shutdownSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L406)
+ Description:
+ Access: protected
+ return: void
This method has no parameters.
### systray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L415)
2022-12-18 22:20:21 +00:00
+ Description:
+ Access: public
+ return: boolean
2022-12-22 22:09:00 +00:00
This method has no parameters.
2022-12-18 22:20:21 +00:00