commit f17c1b42a24329bfdf5a1b37b6dba5ad27d58680 Author: arkonsadter Date: Wed Jan 14 15:36:52 2026 +0600 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d74e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..f256cd3 --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +# Java Browser + +Полнофункциональный веб-браузер на Java с JavaFX. + +## Возможности + +- 🎨 Красивая стартовая страница с градиентным дизайном +- 🔍 Выбор поисковой системы (Google, Yandex, DuckDuckGo, Bing) +- ⭐ Система закладок с сохранением +- 📜 История посещений (до 100 записей) +- 📑 Множественные вкладки +- ⚡ Оптимизированная загрузка страниц +- 💾 Автосохранение всех данных + +## Требования + +- Java 17 или выше +- Maven 3.6+ + +## Запуск + +### Через Maven (рекомендуется): +```bash +mvn clean javafx:run +``` + +### Через JAR: +```bash +mvn clean package +java -jar target/java-browser-1.0-SNAPSHOT.jar +``` + +## Управление + +### Навигация +- **◀ ▶** — Навигация назад/вперёд +- **⟳** — Обновить страницу +- **🏠** — Вернуться на стартовую страницу +- **★** — Добавить текущую страницу в закладки +- **☰** — Открыть/закрыть панель с закладками и историей +- **+** — Создать новую вкладку + +### Управление окном +- **□** — Развернуть/восстановить окно на весь экран +- Окно можно свободно изменять в размере, перетаскивая края +- Стандартные кнопки Windows для сворачивания и закрытия работают как обычно + +### Закрытие браузера +При закрытии окна появится диалог с тремя вариантами: +- **Свернуть** — минимизировать окно в панель задач +- **Выйти** — полностью закрыть браузер +- **Отмена** — продолжить работу + +## Оптимизации + +- Кэширование WebView для быстрой загрузки +- Асинхронная обработка навигации +- Оптимизированный User-Agent +- Фильтрация служебных URL в истории +- Ограничение истории до 100 записей + +## Структура проекта + +``` +src/ +├── main/ +│ ├── java/com/browser/ +│ │ ├── BrowserApp.java # Главный класс приложения +│ │ ├── BrowserController.java # Контроллер UI и логики +│ │ ├── DataManager.java # Управление данными +│ │ └── Launcher.java # Launcher для JAR +│ └── resources/ +│ └── styles/ +│ └── browser.css # Стили интерфейса +└── pom.xml # Maven конфигурация +``` + +## Хранение данных + +Все данные сохраняются в: +- Windows: `C:\Users\[username]\.javabrowser\` +- Linux/Mac: `~/.javabrowser/` + +Файлы: +- `bookmarks.json` — закладки +- `history.json` — история +- `settings.json` — настройки (поисковая система) diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml new file mode 100644 index 0000000..2ba4530 --- /dev/null +++ b/dependency-reduced-pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.browser + java-browser + 1.0-SNAPSHOT + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + com.browser.BrowserApp + + + + maven-shade-plugin + 3.5.1 + + + package + + shade + + + + + com.browser.Launcher + + + + + + + + + + UTF-8 + 21 + 17 + 17 + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..71e7057 --- /dev/null +++ b/pom.xml @@ -0,0 +1,69 @@ + + + 4.0.0 + + com.browser + java-browser + 1.0-SNAPSHOT + jar + + + 17 + 17 + UTF-8 + 21 + + + + + org.openjfx + javafx-controls + ${javafx.version} + + + org.openjfx + javafx-web + ${javafx.version} + + + com.google.code.gson + gson + 2.10.1 + + + + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + com.browser.BrowserApp + + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.1 + + + package + + shade + + + + + com.browser.Launcher + + + + + + + + + diff --git a/src/main/java/com/browser/BrowserApp.java b/src/main/java/com/browser/BrowserApp.java new file mode 100644 index 0000000..ea1e66d --- /dev/null +++ b/src/main/java/com/browser/BrowserApp.java @@ -0,0 +1,26 @@ +package com.browser; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.stage.Stage; + +public class BrowserApp extends Application { + + @Override + public void start(Stage primaryStage) { + BrowserController controller = new BrowserController(primaryStage); + Scene scene = new Scene(controller.getRoot(), 1280, 800); + scene.getStylesheets().add(getClass().getResource("/styles/browser.css").toExternalForm()); + + primaryStage.setTitle("NeveTime Browser"); + primaryStage.setScene(scene); + primaryStage.setResizable(true); + primaryStage.setMinWidth(600); + primaryStage.setMinHeight(600); + primaryStage.show(); + } + + public static void main(String[] args) { + launch(args); + } +} diff --git a/src/main/java/com/browser/BrowserController.java b/src/main/java/com/browser/BrowserController.java new file mode 100644 index 0000000..5870538 --- /dev/null +++ b/src/main/java/com/browser/BrowserController.java @@ -0,0 +1,403 @@ +package com.browser; + +import javafx.application.Platform; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.concurrent.Worker; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.control.*; +import javafx.scene.layout.*; +import javafx.scene.web.WebEngine; +import javafx.scene.web.WebView; +import javafx.stage.Stage; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.net.URLDecoder; + +public class BrowserController { + private BorderPane root; + private TabPane tabPane; + private TextField urlField; + private ComboBox searchEngineCombo; + private VBox sidePanel; + private ListView bookmarksList; + private ListView historyList; + private DataManager dataManager; + private ObservableList bookmarks; + private ObservableList history; + private Stage stage; + + private static final String[] SEARCH_ENGINES = {"Google", "DuckDuckGo"}; + + public BrowserController(Stage stage) { + this.stage = stage; + dataManager = new DataManager(); + bookmarks = FXCollections.observableArrayList(dataManager.loadBookmarks()); + history = FXCollections.observableArrayList(dataManager.loadHistory()); + initUI(); + } + + private void initUI() { + root = new BorderPane(); + root.getStyleClass().add("browser-root"); + root.setTop(createToolbar()); + + tabPane = new TabPane(); + tabPane.getStyleClass().add("browser-tabs"); + + sidePanel = createSidePanel(); + sidePanel.setVisible(false); + sidePanel.setManaged(false); + + HBox center = new HBox(tabPane, sidePanel); + HBox.setHgrow(tabPane, Priority.ALWAYS); + root.setCenter(center); + + createNewTab(); + } + + private HBox createToolbar() { + HBox toolbar = new HBox(8); + toolbar.setPadding(new Insets(10)); + toolbar.setAlignment(Pos.CENTER_LEFT); + toolbar.getStyleClass().add("toolbar"); + + Button backBtn = createNavButton("◀", "Назад"); + backBtn.setOnAction(e -> goBack()); + + Button forwardBtn = createNavButton("▶", "Вперёд"); + forwardBtn.setOnAction(e -> goForward()); + + Button refreshBtn = createNavButton("⟳", "Обновить"); + refreshBtn.setOnAction(e -> refresh()); + + Button homeBtn = createNavButton("🏠", "Домой"); + homeBtn.setOnAction(e -> showStartPage()); + + // Левый спейсер для центрирования поиска + Region leftSpacer = new Region(); + HBox.setHgrow(leftSpacer, Priority.ALWAYS); + + urlField = new TextField(); + urlField.setPromptText("Введите URL или поисковый запрос..."); + urlField.getStyleClass().add("url-field"); + urlField.setPrefWidth(600); + urlField.setMaxWidth(600); + urlField.setOnAction(e -> navigate(urlField.getText())); + + searchEngineCombo = new ComboBox<>(); + searchEngineCombo.getItems().addAll(SEARCH_ENGINES); + searchEngineCombo.setValue(dataManager.loadSearchEngine()); + searchEngineCombo.getStyleClass().add("search-combo"); + searchEngineCombo.setOnAction(e -> dataManager.saveSearchEngine(searchEngineCombo.getValue())); + + // Правый спейсер для центрирования поиска + Region rightSpacer = new Region(); + HBox.setHgrow(rightSpacer, Priority.ALWAYS); + + Button addBookmarkBtn = createNavButton("★", "Добавить закладку"); + addBookmarkBtn.setOnAction(e -> addBookmark()); + + Button panelBtn = createNavButton("☰", "Панель"); + panelBtn.setOnAction(e -> toggleSidePanel()); + + Button newTabBtn = createNavButton("+", "Новая вкладка"); + newTabBtn.setOnAction(e -> createNewTab()); + + Button maximizeBtn = createNavButton("□", "Развернуть/Восстановить"); + maximizeBtn.setOnAction(e -> stage.setMaximized(!stage.isMaximized())); + + toolbar.getChildren().addAll(backBtn, forwardBtn, refreshBtn, homeBtn, + leftSpacer, urlField, searchEngineCombo, rightSpacer, + addBookmarkBtn, panelBtn, newTabBtn, maximizeBtn); + + return toolbar; + } + + private Button createNavButton(String text, String tooltip) { + Button btn = new Button(text); + btn.getStyleClass().add("nav-button"); + btn.setTooltip(new Tooltip(tooltip)); + return btn; + } + + private VBox createSidePanel() { + VBox panel = new VBox(10); + panel.setPadding(new Insets(10)); + panel.setPrefWidth(280); + panel.getStyleClass().add("side-panel"); + + Label bookmarksLabel = new Label("📑 Закладки"); + bookmarksLabel.getStyleClass().add("panel-label"); + bookmarksList = new ListView<>(bookmarks); + bookmarksList.setPrefHeight(200); + bookmarksList.getStyleClass().add("panel-list"); + bookmarksList.setOnMouseClicked(e -> { + if (e.getClickCount() == 2) { + String selected = bookmarksList.getSelectionModel().getSelectedItem(); + if (selected != null) navigate(selected); + } + }); + + Button deleteBookmarkBtn = new Button("Удалить закладку"); + deleteBookmarkBtn.getStyleClass().add("panel-button"); + deleteBookmarkBtn.setOnAction(e -> { + String selected = bookmarksList.getSelectionModel().getSelectedItem(); + if (selected != null) { + bookmarks.remove(selected); + dataManager.saveBookmarks(bookmarks); + } + }); + + Label historyLabel = new Label("📜 История"); + historyLabel.getStyleClass().add("panel-label"); + historyList = new ListView<>(history); + historyList.setPrefHeight(250); + historyList.getStyleClass().add("panel-list"); + historyList.setOnMouseClicked(e -> { + if (e.getClickCount() == 2) { + String selected = historyList.getSelectionModel().getSelectedItem(); + if (selected != null) { + String url = selected.split(" - ")[0]; + navigate(url); + } + } + }); + + Button clearHistoryBtn = new Button("Очистить историю"); + clearHistoryBtn.getStyleClass().add("panel-button"); + clearHistoryBtn.setOnAction(e -> { + history.clear(); + dataManager.saveHistory(history); + }); + + panel.getChildren().addAll(bookmarksLabel, bookmarksList, deleteBookmarkBtn, + new Separator(), historyLabel, historyList, clearHistoryBtn); + return panel; + } + + + private void createNewTab() { + Tab tab = new Tab("Новая вкладка"); + tab.setClosable(tabPane.getTabs().size() > 0); + + WebView webView = new WebView(); + webView.setCache(true); + webView.setContextMenuEnabled(true); + + WebEngine engine = webView.getEngine(); + engine.setJavaScriptEnabled(true); + engine.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/120.0.0.0 Safari/537.36"); + + engine.titleProperty().addListener((obs, oldTitle, newTitle) -> { + if (newTitle != null && !newTitle.isEmpty()) { + tab.setText(newTitle.length() > 20 ? newTitle.substring(0, 20) + "..." : newTitle); + } + }); + + engine.locationProperty().addListener((obs, oldLoc, newLoc) -> { + if (newLoc != null && tabPane.getSelectionModel().getSelectedItem() == tab) { + // Перехват поиска со стартовой страницы + if (newLoc.startsWith("search:")) { + try { + String query = URLDecoder.decode(newLoc.substring(7), "UTF-8"); + Platform.runLater(() -> navigate(query)); + } catch (Exception e) { + e.printStackTrace(); + } + } else if (!newLoc.startsWith("data:")) { + urlField.setText(newLoc); + } + } + }); + + // Индикатор загрузки + engine.getLoadWorker().stateProperty().addListener((obs, oldState, newState) -> { + if (newState == Worker.State.RUNNING) { + tab.setText("Загрузка..."); + } + }); + + tab.setContent(webView); + tab.setUserData(webView); + tabPane.getTabs().add(tab); + tabPane.getSelectionModel().select(tab); + + showStartPage(); + } + + private void showStartPage() { + WebView webView = getCurrentWebView(); + if (webView != null) { + webView.getEngine().loadContent(getStartPageHTML()); + urlField.setText(""); + } + } + + private String getStartPageHTML() { + String engine = searchEngineCombo.getValue(); + return "" + + "
" + + "
" + + "

NeveTime Browser

" + + "

Быстрый и современный браузер

" + + "
Поиск в " + engine + "
" + + "" + + "
" + + ""; + } + + private void navigate(String input) { + if (input == null || input.trim().isEmpty()) return; + input = input.trim(); + + WebView webView = getCurrentWebView(); + if (webView == null) return; + + String url; + if (input.startsWith("search:")) { + try { + String query = URLDecoder.decode(input.substring(7), "UTF-8"); + url = getSearchUrl(query); + } catch (Exception e) { + url = getSearchUrl(input.substring(7)); + } + } else if (input.matches("^https?://.*")) { + url = input; + } else if (input.contains(".") && !input.contains(" ")) { + url = "https://" + input; + } else { + url = getSearchUrl(input); + } + + final String finalUrl = url; + Platform.runLater(() -> { + webView.getEngine().load(finalUrl); + addToHistory(finalUrl); + }); + } + + private String getSearchUrl(String query) { + String engine = searchEngineCombo.getValue(); + try { + query = java.net.URLEncoder.encode(query, "UTF-8"); + } catch (Exception e) {} + return switch (engine) { + case "Yandex" -> "https://yandex.ru/search/?text=" + query; + case "DuckDuckGo" -> "https://duckduckgo.com/?q=" + query; + case "Bing" -> "https://www.bing.com/search?q=" + query; + default -> "https://www.google.com/search?q=" + query; + }; + } + + private void addToHistory(String url) { + if (url == null || url.isEmpty() || url.startsWith("data:") || url.startsWith("about:")) return; + + Platform.runLater(() -> { + String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("HH:mm dd.MM")); + String entry = url + " - " + timestamp; + history.add(0, entry); + if (history.size() > 100) history.remove(history.size() - 1); + dataManager.saveHistory(history); + }); + } + + private void addBookmark() { + WebView webView = getCurrentWebView(); + if (webView != null) { + String url = webView.getEngine().getLocation(); + if (url != null && !url.isEmpty() && !url.startsWith("data:") && !bookmarks.contains(url)) { + bookmarks.add(url); + dataManager.saveBookmarks(bookmarks); + showAlert("Закладка добавлена", url); + } + } + } + + private void showAlert(String title, String message) { + Platform.runLater(() -> { + Alert alert = new Alert(Alert.AlertType.INFORMATION); + alert.setTitle(title); + alert.setHeaderText(null); + alert.setContentText(message); + alert.showAndWait(); + }); + } + + private void goBack() { + WebView webView = getCurrentWebView(); + if (webView != null && webView.getEngine().getHistory().getCurrentIndex() > 0) { + webView.getEngine().getHistory().go(-1); + } + } + + private void goForward() { + WebView webView = getCurrentWebView(); + if (webView != null) { + var hist = webView.getEngine().getHistory(); + if (hist.getCurrentIndex() < hist.getEntries().size() - 1) { + hist.go(1); + } + } + } + + private void refresh() { + WebView webView = getCurrentWebView(); + if (webView != null) webView.getEngine().reload(); + } + + private void toggleSidePanel() { + sidePanel.setVisible(!sidePanel.isVisible()); + sidePanel.setManaged(sidePanel.isVisible()); + } + + private WebView getCurrentWebView() { + Tab tab = tabPane.getSelectionModel().getSelectedItem(); + return tab != null ? (WebView) tab.getUserData() : null; + } + + public BorderPane getRoot() { return root; } +} diff --git a/src/main/java/com/browser/DataManager.java b/src/main/java/com/browser/DataManager.java new file mode 100644 index 0000000..a3ca6c4 --- /dev/null +++ b/src/main/java/com/browser/DataManager.java @@ -0,0 +1,82 @@ +package com.browser; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import java.io.*; +import java.nio.file.*; +import java.util.ArrayList; +import java.util.List; + +public class DataManager { + private static final String DATA_DIR = System.getProperty("user.home") + "/.javabrowser"; + private static final String BOOKMARKS_FILE = DATA_DIR + "/bookmarks.json"; + private static final String HISTORY_FILE = DATA_DIR + "/history.json"; + private static final String SETTINGS_FILE = DATA_DIR + "/settings.json"; + private final Gson gson = new Gson(); + + public DataManager() { + try { + Files.createDirectories(Paths.get(DATA_DIR)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public List loadBookmarks() { + return loadList(BOOKMARKS_FILE); + } + + public void saveBookmarks(List bookmarks) { + saveList(BOOKMARKS_FILE, bookmarks); + } + + public List loadHistory() { + return loadList(HISTORY_FILE); + } + + public void saveHistory(List history) { + saveList(HISTORY_FILE, history); + } + + public String loadSearchEngine() { + try { + String content = Files.readString(Paths.get(SETTINGS_FILE)); + Settings settings = gson.fromJson(content, Settings.class); + return settings != null && settings.searchEngine != null ? settings.searchEngine : "Google"; + } catch (IOException e) { + return "Google"; + } + } + + public void saveSearchEngine(String engine) { + try { + Settings settings = new Settings(); + settings.searchEngine = engine; + Files.writeString(Paths.get(SETTINGS_FILE), gson.toJson(settings)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private List loadList(String file) { + try { + String content = Files.readString(Paths.get(file)); + List list = gson.fromJson(content, new TypeToken>(){}.getType()); + return list != null ? new ArrayList<>(list) : new ArrayList<>(); + } catch (IOException e) { + return new ArrayList<>(); + } + } + + private void saveList(String file, List list) { + try { + Files.writeString(Paths.get(file), gson.toJson(list)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static class Settings { + String searchEngine; + } +} diff --git a/src/main/java/com/browser/Launcher.java b/src/main/java/com/browser/Launcher.java new file mode 100644 index 0000000..b9ba29f --- /dev/null +++ b/src/main/java/com/browser/Launcher.java @@ -0,0 +1,8 @@ +package com.browser; + +// Launcher class needed for JAR execution with JavaFX +public class Launcher { + public static void main(String[] args) { + BrowserApp.main(args); + } +} diff --git a/src/main/resources/styles/browser.css b/src/main/resources/styles/browser.css new file mode 100644 index 0000000..a1ae4f0 --- /dev/null +++ b/src/main/resources/styles/browser.css @@ -0,0 +1,184 @@ +/* Lightweight Modern Theme */ +.browser-root { + -fx-background-color: #0f0f1a; +} + +.toolbar { + -fx-background-color: #1a1a2e; + -fx-padding: 10px 16px; + -fx-border-color: #2a2a4a; + -fx-border-width: 0 0 1px 0; +} + +.nav-button { + -fx-background-color: #252542; + -fx-text-fill: #e0e0e0; + -fx-font-size: 14px; + -fx-padding: 8px 14px; + -fx-background-radius: 8px; + -fx-border-radius: 8px; + -fx-border-color: #3a3a5a; + -fx-border-width: 1px; + -fx-cursor: hand; +} + +.nav-button:hover { + -fx-background-color: #8b5cf6; + -fx-border-color: #8b5cf6; +} + +.nav-button:pressed { + -fx-background-color: #7c3aed; +} + +.url-field { + -fx-background-color: #1e1e32; + -fx-text-fill: white; + -fx-prompt-text-fill: #666; + -fx-font-size: 14px; + -fx-padding: 10px 20px; + -fx-background-radius: 12px; + -fx-border-radius: 12px; + -fx-border-color: #3a3a5a; + -fx-border-width: 1px; +} + +.url-field:focused { + -fx-border-color: #8b5cf6; +} + +.search-combo { + -fx-background-color: #252542; + -fx-border-color: #3a3a5a; + -fx-border-radius: 8px; + -fx-background-radius: 8px; + -fx-padding: 6px 12px; +} + +.search-combo .list-cell { + -fx-text-fill: white; + -fx-background-color: transparent; +} + +.search-combo .combo-box-popup .list-view { + -fx-background-color: #1a1a2e; +} + +.search-combo .combo-box-popup .list-cell { + -fx-background-color: #1a1a2e; + -fx-text-fill: white; + -fx-padding: 10px 14px; +} + +.search-combo .combo-box-popup .list-cell:hover { + -fx-background-color: #8b5cf6; +} + +.browser-tabs { + -fx-background-color: #0f0f1a; +} + +.browser-tabs .tab-header-area { + -fx-background-color: #12121f; + -fx-padding: 6px 6px 0 6px; +} + +.browser-tabs .tab-header-background { + -fx-background-color: #12121f; +} + +.browser-tabs .tab { + -fx-background-color: #1a1a2e; + -fx-background-radius: 8px 8px 0 0; + -fx-padding: 8px 16px; +} + +.browser-tabs .tab:selected { + -fx-background-color: #252542; +} + +.browser-tabs .tab .tab-label { + -fx-text-fill: #aaa; + -fx-font-size: 13px; +} + +.browser-tabs .tab:selected .tab-label { + -fx-text-fill: white; +} + +.side-panel { + -fx-background-color: #1a1a2e; + -fx-border-color: #2a2a4a; + -fx-border-width: 0 0 0 1px; +} + +.panel-label { + -fx-text-fill: white; + -fx-font-size: 15px; + -fx-font-weight: bold; + -fx-padding: 6px 0; +} + +.panel-list { + -fx-background-color: #1e1e32; + -fx-background-radius: 8px; +} + +.panel-list .list-cell { + -fx-background-color: transparent; + -fx-text-fill: #ccc; + -fx-padding: 10px 12px; + -fx-font-size: 12px; +} + +.panel-list .list-cell:hover { + -fx-background-color: #2a2a4a; +} + +.panel-list .list-cell:selected { + -fx-background-color: #8b5cf6; + -fx-text-fill: white; +} + +.panel-button { + -fx-background-color: #8b5cf6; + -fx-text-fill: white; + -fx-padding: 10px 16px; + -fx-background-radius: 8px; + -fx-cursor: hand; + -fx-font-size: 12px; +} + +.panel-button:hover { + -fx-background-color: #7c3aed; +} + +.separator .line { + -fx-border-color: #2a2a4a; +} + +.scroll-bar { + -fx-background-color: transparent; +} + +.scroll-bar .thumb { + -fx-background-color: #3a3a5a; + -fx-background-radius: 4px; +} + +.scroll-bar .thumb:hover { + -fx-background-color: #8b5cf6; +} + +.scroll-bar .increment-button, .scroll-bar .decrement-button { + -fx-background-color: transparent; + -fx-padding: 0; +} + +.tooltip { + -fx-background-color: #252542; + -fx-text-fill: white; + -fx-font-size: 12px; + -fx-padding: 8px 12px; + -fx-background-radius: 6px; +} diff --git a/target/classes/com/browser/BrowserApp.class b/target/classes/com/browser/BrowserApp.class new file mode 100644 index 0000000..0f03c69 Binary files /dev/null and b/target/classes/com/browser/BrowserApp.class differ diff --git a/target/classes/com/browser/BrowserController.class b/target/classes/com/browser/BrowserController.class new file mode 100644 index 0000000..e9154ee Binary files /dev/null and b/target/classes/com/browser/BrowserController.class differ diff --git a/target/classes/com/browser/DataManager$1.class b/target/classes/com/browser/DataManager$1.class new file mode 100644 index 0000000..0004d9c Binary files /dev/null and b/target/classes/com/browser/DataManager$1.class differ diff --git a/target/classes/com/browser/DataManager$Settings.class b/target/classes/com/browser/DataManager$Settings.class new file mode 100644 index 0000000..c907b4e Binary files /dev/null and b/target/classes/com/browser/DataManager$Settings.class differ diff --git a/target/classes/com/browser/DataManager.class b/target/classes/com/browser/DataManager.class new file mode 100644 index 0000000..ea48b1f Binary files /dev/null and b/target/classes/com/browser/DataManager.class differ diff --git a/target/classes/com/browser/Launcher.class b/target/classes/com/browser/Launcher.class new file mode 100644 index 0000000..75686b0 Binary files /dev/null and b/target/classes/com/browser/Launcher.class differ diff --git a/target/classes/styles/browser.css b/target/classes/styles/browser.css new file mode 100644 index 0000000..a1ae4f0 --- /dev/null +++ b/target/classes/styles/browser.css @@ -0,0 +1,184 @@ +/* Lightweight Modern Theme */ +.browser-root { + -fx-background-color: #0f0f1a; +} + +.toolbar { + -fx-background-color: #1a1a2e; + -fx-padding: 10px 16px; + -fx-border-color: #2a2a4a; + -fx-border-width: 0 0 1px 0; +} + +.nav-button { + -fx-background-color: #252542; + -fx-text-fill: #e0e0e0; + -fx-font-size: 14px; + -fx-padding: 8px 14px; + -fx-background-radius: 8px; + -fx-border-radius: 8px; + -fx-border-color: #3a3a5a; + -fx-border-width: 1px; + -fx-cursor: hand; +} + +.nav-button:hover { + -fx-background-color: #8b5cf6; + -fx-border-color: #8b5cf6; +} + +.nav-button:pressed { + -fx-background-color: #7c3aed; +} + +.url-field { + -fx-background-color: #1e1e32; + -fx-text-fill: white; + -fx-prompt-text-fill: #666; + -fx-font-size: 14px; + -fx-padding: 10px 20px; + -fx-background-radius: 12px; + -fx-border-radius: 12px; + -fx-border-color: #3a3a5a; + -fx-border-width: 1px; +} + +.url-field:focused { + -fx-border-color: #8b5cf6; +} + +.search-combo { + -fx-background-color: #252542; + -fx-border-color: #3a3a5a; + -fx-border-radius: 8px; + -fx-background-radius: 8px; + -fx-padding: 6px 12px; +} + +.search-combo .list-cell { + -fx-text-fill: white; + -fx-background-color: transparent; +} + +.search-combo .combo-box-popup .list-view { + -fx-background-color: #1a1a2e; +} + +.search-combo .combo-box-popup .list-cell { + -fx-background-color: #1a1a2e; + -fx-text-fill: white; + -fx-padding: 10px 14px; +} + +.search-combo .combo-box-popup .list-cell:hover { + -fx-background-color: #8b5cf6; +} + +.browser-tabs { + -fx-background-color: #0f0f1a; +} + +.browser-tabs .tab-header-area { + -fx-background-color: #12121f; + -fx-padding: 6px 6px 0 6px; +} + +.browser-tabs .tab-header-background { + -fx-background-color: #12121f; +} + +.browser-tabs .tab { + -fx-background-color: #1a1a2e; + -fx-background-radius: 8px 8px 0 0; + -fx-padding: 8px 16px; +} + +.browser-tabs .tab:selected { + -fx-background-color: #252542; +} + +.browser-tabs .tab .tab-label { + -fx-text-fill: #aaa; + -fx-font-size: 13px; +} + +.browser-tabs .tab:selected .tab-label { + -fx-text-fill: white; +} + +.side-panel { + -fx-background-color: #1a1a2e; + -fx-border-color: #2a2a4a; + -fx-border-width: 0 0 0 1px; +} + +.panel-label { + -fx-text-fill: white; + -fx-font-size: 15px; + -fx-font-weight: bold; + -fx-padding: 6px 0; +} + +.panel-list { + -fx-background-color: #1e1e32; + -fx-background-radius: 8px; +} + +.panel-list .list-cell { + -fx-background-color: transparent; + -fx-text-fill: #ccc; + -fx-padding: 10px 12px; + -fx-font-size: 12px; +} + +.panel-list .list-cell:hover { + -fx-background-color: #2a2a4a; +} + +.panel-list .list-cell:selected { + -fx-background-color: #8b5cf6; + -fx-text-fill: white; +} + +.panel-button { + -fx-background-color: #8b5cf6; + -fx-text-fill: white; + -fx-padding: 10px 16px; + -fx-background-radius: 8px; + -fx-cursor: hand; + -fx-font-size: 12px; +} + +.panel-button:hover { + -fx-background-color: #7c3aed; +} + +.separator .line { + -fx-border-color: #2a2a4a; +} + +.scroll-bar { + -fx-background-color: transparent; +} + +.scroll-bar .thumb { + -fx-background-color: #3a3a5a; + -fx-background-radius: 4px; +} + +.scroll-bar .thumb:hover { + -fx-background-color: #8b5cf6; +} + +.scroll-bar .increment-button, .scroll-bar .decrement-button { + -fx-background-color: transparent; + -fx-padding: 0; +} + +.tooltip { + -fx-background-color: #252542; + -fx-text-fill: white; + -fx-font-size: 12px; + -fx-padding: 8px 12px; + -fx-background-radius: 6px; +} diff --git a/target/java-browser-1.0-SNAPSHOT.jar b/target/java-browser-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..f29e334 Binary files /dev/null and b/target/java-browser-1.0-SNAPSHOT.jar differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..8c4127e --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=java-browser +groupId=com.browser +version=1.0-SNAPSHOT diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..6fe8788 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,6 @@ +com\browser\Launcher.class +com\browser\BrowserApp.class +com\browser\DataManager$Settings.class +com\browser\BrowserController.class +com\browser\DataManager$1.class +com\browser\DataManager.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..008119e --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,4 @@ +d:\Desktop\adadad\src\main\java\com\browser\BrowserApp.java +d:\Desktop\adadad\src\main\java\com\browser\BrowserController.java +d:\Desktop\adadad\src\main\java\com\browser\DataManager.java +d:\Desktop\adadad\src\main\java\com\browser\Launcher.java diff --git a/target/original-java-browser-1.0-SNAPSHOT.jar b/target/original-java-browser-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..e4fc362 Binary files /dev/null and b/target/original-java-browser-1.0-SNAPSHOT.jar differ