")
+ .addClass(category === "modules"
+ ? "one-column-search-results"
+ : "two-column-search-results");
+ var col1, col2;
+ if (category === "modules") {
+ col1 = "Module";
+ } else if (category === "packages") {
+ col1 = "Module";
+ col2 = "Package";
+ } else if (category === "types") {
+ col1 = "Package";
+ col2 = "Class"
+ } else if (category === "members") {
+ col1 = "Class";
+ col2 = "Member";
+ } else if (category === "searchTags") {
+ col1 = "Location";
+ col2 = "Name";
+ }
+ $("").appendTo(table);
+ if (category !== "modules") {
+ $("").appendTo(table);
+ }
+ $.each(items, function(index, item) {
+ var rowColor = index % 2 ? "odd-row-color" : "even-row-color";
+ renderItem(item, table, rowColor);
+ });
+ return table;
+ }
+ function renderItem(item, table, rowColor) {
+ var label = getHighlightedText(item.input, item.boundaries, item.prefix.length, item.input.length);
+ var link = $("
")
+ .attr("href", getURL(item.indexItem, item.category))
+ .attr("tabindex", "0")
+ .addClass("search-result-link")
+ .html(label);
+ var container = getHighlightedText(item.input, item.boundaries, 0, item.prefix.length - 1);
+ if (item.category === "searchTags") {
+ container = item.indexItem.h || "";
+ }
+ if (item.category !== "modules") {
+ $("
").html(container).addClass("col-plain").addClass(rowColor).appendTo(table);
+ }
+ $("
").html(link).addClass("col-last").addClass(rowColor).appendTo(table);
+ }
+ var timeout;
+ function schedulePageSearch() {
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ timeout = setTimeout(function () {
+ doPageSearch()
+ }, 100);
+ }
+ function doPageSearch() {
+ setSearchUrl();
+ var term = searchTerm = input.val().trim();
+ if (term === "") {
+ notify.html(messages.enterTerm);
+ activeTab = "";
+ fixedTab = false;
+ resultContainer.empty();
+ resultSection.hide();
+ } else {
+ notify.html(messages.searching);
+ doSearch({ term: term, maxResults: 1200 }, renderResults);
+ }
+ }
+ function setSearchUrl() {
+ var query = input.val().trim();
+ var url = document.location.pathname;
+ if (query) {
+ url += "?q=" + encodeURI(query);
+ if (activeTab && fixedTab) {
+ url += "&c=" + activeTab;
+ }
+ }
+ history.replaceState({query: query}, "", url);
+ }
+ input.on("input", function(e) {
+ feelingLucky = false;
+ schedulePageSearch();
+ });
+ $(document).keydown(function(e) {
+ if ((e.ctrlKey || e.metaKey) && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
+ if (activeTab && visibleTabs.length > 1) {
+ var idx = visibleTabs.indexOf(activeTab);
+ idx += e.key === "ArrowLeft" ? visibleTabs.length - 1 : 1;
+ selectTab(visibleTabs[idx % visibleTabs.length]);
+ return false;
+ }
+ }
+ });
+ reset.click(function() {
+ notify.html(messages.enterTerm);
+ resultSection.hide();
+ activeTab = "";
+ fixedTab = false;
+ resultContainer.empty();
+ input.val('').focus();
+ setSearchUrl();
+ });
+ input.prop("disabled", false);
+ reset.prop("disabled", false);
+
+ var urlParams = new URLSearchParams(window.location.search);
+ if (urlParams.has("q")) {
+ input.val(urlParams.get("q"))
+ }
+ if (urlParams.has("c")) {
+ activeTab = urlParams.get("c");
+ fixedTab = true;
+ }
+ if (urlParams.get("r")) {
+ feelingLucky = true;
+ }
+ if (input.val()) {
+ doPageSearch();
+ } else {
+ notify.html(messages.enterTerm);
+ }
+ input.select().focus();
+});
diff --git a/doc/search.html b/doc/search.html
new file mode 100644
index 0000000..2211552
--- /dev/null
+++ b/doc/search.html
@@ -0,0 +1,71 @@
+
+
+
+
+
Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+Search
+
+
+
+
+Additional resources
+
+
+
+
The help page provides an introduction to the scope and syntax of JavaDoc search.
+
You can use the <ctrl> or <cmd> keys in combination with the left and right arrow keys to switch between result tabs in this page.
+
The URL template below may be used to configure this page as a search engine in browsers that support this feature. It has been tested to work in Google Chrome and Mozilla Firefox. Note that other browsers may not support this feature or require a different URL format.
+
link Copy
+
+
+Redirect to first result
+
+Loading search index...
+
+
+
+
+
+
diff --git a/doc/search.js b/doc/search.js
new file mode 100644
index 0000000..4ca9557
--- /dev/null
+++ b/doc/search.js
@@ -0,0 +1,458 @@
+/*
+ * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
+ * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+"use strict";
+const messages = {
+ enterTerm: "Enter a search term",
+ noResult: "No results found",
+ oneResult: "Found one result",
+ manyResults: "Found {0} results",
+ loading: "Loading search index...",
+ searching: "Searching...",
+ redirecting: "Redirecting to first result...",
+ linkIcon: "Link icon",
+ linkToSection: "Link to this section"
+}
+const categories = {
+ modules: "Modules",
+ packages: "Packages",
+ types: "Classes and Interfaces",
+ members: "Members",
+ searchTags: "Search Tags"
+};
+const highlight = "
$& ";
+const NO_MATCH = {};
+const MAX_RESULTS = 300;
+function checkUnnamed(name, separator) {
+ return name === "
" || !name ? "" : name + separator;
+}
+function escapeHtml(str) {
+ return str.replace(//g, ">");
+}
+function getHighlightedText(str, boundaries, from, to) {
+ var start = from;
+ var text = "";
+ for (var i = 0; i < boundaries.length; i += 2) {
+ var b0 = boundaries[i];
+ var b1 = boundaries[i + 1];
+ if (b0 >= to || b1 <= from) {
+ continue;
+ }
+ text += escapeHtml(str.slice(start, Math.max(start, b0)));
+ text += "";
+ text += escapeHtml(str.slice(Math.max(start, b0), Math.min(to, b1)));
+ text += " ";
+ start = Math.min(to, b1);
+ }
+ text += escapeHtml(str.slice(start, to));
+ return text;
+}
+function getURLPrefix(item, category) {
+ var urlPrefix = "";
+ var slash = "/";
+ if (category === "modules") {
+ return item.l + slash;
+ } else if (category === "packages" && item.m) {
+ return item.m + slash;
+ } else if (category === "types" || category === "members") {
+ if (item.m) {
+ urlPrefix = item.m + slash;
+ } else {
+ $.each(packageSearchIndex, function(index, it) {
+ if (it.m && item.p === it.l) {
+ urlPrefix = it.m + slash;
+ }
+ });
+ }
+ }
+ return urlPrefix;
+}
+function getURL(item, category) {
+ if (item.url) {
+ return item.url;
+ }
+ var url = getURLPrefix(item, category);
+ if (category === "modules") {
+ url += "module-summary.html";
+ } else if (category === "packages") {
+ if (item.u) {
+ url = item.u;
+ } else {
+ url += item.l.replace(/\./g, '/') + "/package-summary.html";
+ }
+ } else if (category === "types") {
+ if (item.u) {
+ url = item.u;
+ } else {
+ url += checkUnnamed(item.p, "/").replace(/\./g, '/') + item.l + ".html";
+ }
+ } else if (category === "members") {
+ url += checkUnnamed(item.p, "/").replace(/\./g, '/') + item.c + ".html" + "#";
+ if (item.u) {
+ url += item.u;
+ } else {
+ url += item.l;
+ }
+ } else if (category === "searchTags") {
+ url += item.u;
+ }
+ item.url = url;
+ return url;
+}
+function createMatcher(term, camelCase) {
+ if (camelCase && !isUpperCase(term)) {
+ return null; // no need for camel-case matcher for lower case query
+ }
+ var pattern = "";
+ var upperCase = [];
+ term.trim().split(/\s+/).forEach(function(w, index, array) {
+ var tokens = w.split(/(?=[A-Z,.()<>?[\/])/);
+ for (var i = 0; i < tokens.length; i++) {
+ var s = tokens[i];
+ // ',' and '?' are the only delimiters commonly followed by space in java signatures
+ pattern += "(" + $.ui.autocomplete.escapeRegex(s).replace(/[,?]/g, "$&\\s*?") + ")";
+ upperCase.push(false);
+ var isWordToken = /\w$/.test(s);
+ if (isWordToken) {
+ if (i === tokens.length - 1 && index < array.length - 1) {
+ // space in query string matches all delimiters
+ pattern += "(.*?)";
+ upperCase.push(isUpperCase(s[0]));
+ } else {
+ if (!camelCase && isUpperCase(s) && s.length === 1) {
+ pattern += "()";
+ } else {
+ pattern += "([a-z0-9$<>?[\\]]*?)";
+ }
+ upperCase.push(isUpperCase(s[0]));
+ }
+ } else {
+ pattern += "()";
+ upperCase.push(false);
+ }
+ }
+ });
+ var re = new RegExp(pattern, "gi");
+ re.upperCase = upperCase;
+ return re;
+}
+function findMatch(matcher, input, startOfName, endOfName) {
+ var from = startOfName;
+ matcher.lastIndex = from;
+ var match = matcher.exec(input);
+ // Expand search area until we get a valid result or reach the beginning of the string
+ while (!match || match.index + match[0].length < startOfName || endOfName < match.index) {
+ if (from === 0) {
+ return NO_MATCH;
+ }
+ from = input.lastIndexOf(".", from - 2) + 1;
+ matcher.lastIndex = from;
+ match = matcher.exec(input);
+ }
+ var boundaries = [];
+ var matchEnd = match.index + match[0].length;
+ var score = 5;
+ var start = match.index;
+ var prevEnd = -1;
+ for (var i = 1; i < match.length; i += 2) {
+ var isUpper = isUpperCase(input[start]);
+ var isMatcherUpper = matcher.upperCase[i];
+ // capturing groups come in pairs, match and non-match
+ boundaries.push(start, start + match[i].length);
+ // make sure groups are anchored on a left word boundary
+ var prevChar = input[start - 1] || "";
+ var nextChar = input[start + 1] || "";
+ if (start !== 0 && !/[\W_]/.test(prevChar) && !/[\W_]/.test(input[start])) {
+ if (isUpper && (isLowerCase(prevChar) || isLowerCase(nextChar))) {
+ score -= 0.1;
+ } else if (isMatcherUpper && start === prevEnd) {
+ score -= isUpper ? 0.1 : 1.0;
+ } else {
+ return NO_MATCH;
+ }
+ }
+ prevEnd = start + match[i].length;
+ start += match[i].length + match[i + 1].length;
+
+ // lower score for parts of the name that are missing
+ if (match[i + 1] && prevEnd < endOfName) {
+ score -= rateNoise(match[i + 1]);
+ }
+ }
+ // lower score if a type name contains unmatched camel-case parts
+ if (input[matchEnd - 1] !== "." && endOfName > matchEnd)
+ score -= rateNoise(input.slice(matchEnd, endOfName));
+ score -= rateNoise(input.slice(0, Math.max(startOfName, match.index)));
+
+ if (score <= 0) {
+ return NO_MATCH;
+ }
+ return {
+ input: input,
+ score: score,
+ boundaries: boundaries
+ };
+}
+function isUpperCase(s) {
+ return s !== s.toLowerCase();
+}
+function isLowerCase(s) {
+ return s !== s.toUpperCase();
+}
+function rateNoise(str) {
+ return (str.match(/([.(])/g) || []).length / 5
+ + (str.match(/([A-Z]+)/g) || []).length / 10
+ + str.length / 20;
+}
+function doSearch(request, response) {
+ var term = request.term.trim();
+ var maxResults = request.maxResults || MAX_RESULTS;
+ if (term.length === 0) {
+ return this.close();
+ }
+ var matcher = {
+ plainMatcher: createMatcher(term, false),
+ camelCaseMatcher: createMatcher(term, true)
+ }
+ var indexLoaded = indexFilesLoaded();
+
+ function getPrefix(item, category) {
+ switch (category) {
+ case "packages":
+ return checkUnnamed(item.m, "/");
+ case "types":
+ return checkUnnamed(item.p, ".");
+ case "members":
+ return checkUnnamed(item.p, ".") + item.c + ".";
+ default:
+ return "";
+ }
+ }
+ function useQualifiedName(category) {
+ switch (category) {
+ case "packages":
+ return /[\s/]/.test(term);
+ case "types":
+ case "members":
+ return /[\s.]/.test(term);
+ default:
+ return false;
+ }
+ }
+ function searchIndex(indexArray, category) {
+ var matches = [];
+ if (!indexArray) {
+ if (!indexLoaded) {
+ matches.push({ l: messages.loading, category: category });
+ }
+ return matches;
+ }
+ $.each(indexArray, function (i, item) {
+ var prefix = getPrefix(item, category);
+ var simpleName = item.l;
+ var qualifiedName = prefix + simpleName;
+ var useQualified = useQualifiedName(category);
+ var input = useQualified ? qualifiedName : simpleName;
+ var startOfName = useQualified ? prefix.length : 0;
+ var endOfName = category === "members" && input.indexOf("(", startOfName) > -1
+ ? input.indexOf("(", startOfName) : input.length;
+ var m = findMatch(matcher.plainMatcher, input, startOfName, endOfName);
+ if (m === NO_MATCH && matcher.camelCaseMatcher) {
+ m = findMatch(matcher.camelCaseMatcher, input, startOfName, endOfName);
+ }
+ if (m !== NO_MATCH) {
+ m.indexItem = item;
+ m.prefix = prefix;
+ m.category = category;
+ if (!useQualified) {
+ m.input = qualifiedName;
+ m.boundaries = m.boundaries.map(function(b) {
+ return b + prefix.length;
+ });
+ }
+ matches.push(m);
+ }
+ return true;
+ });
+ return matches.sort(function(e1, e2) {
+ return e2.score - e1.score;
+ }).slice(0, maxResults);
+ }
+
+ var result = searchIndex(moduleSearchIndex, "modules")
+ .concat(searchIndex(packageSearchIndex, "packages"))
+ .concat(searchIndex(typeSearchIndex, "types"))
+ .concat(searchIndex(memberSearchIndex, "members"))
+ .concat(searchIndex(tagSearchIndex, "searchTags"));
+
+ if (!indexLoaded) {
+ updateSearchResults = function() {
+ doSearch(request, response);
+ }
+ } else {
+ updateSearchResults = function() {};
+ }
+ response(result);
+}
+// JQuery search menu implementation
+$.widget("custom.catcomplete", $.ui.autocomplete, {
+ _create: function() {
+ this._super();
+ this.widget().menu("option", "items", "> .result-item");
+ // workaround for search result scrolling
+ this.menu._scrollIntoView = function _scrollIntoView( item ) {
+ var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
+ if ( this._hasScroll() ) {
+ borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
+ paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
+ offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
+ scroll = this.activeMenu.scrollTop();
+ elementHeight = this.activeMenu.height() - 26;
+ itemHeight = item.outerHeight();
+
+ if ( offset < 0 ) {
+ this.activeMenu.scrollTop( scroll + offset );
+ } else if ( offset + itemHeight > elementHeight ) {
+ this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
+ }
+ }
+ };
+ },
+ _renderMenu: function(ul, items) {
+ var currentCategory = "";
+ var widget = this;
+ widget.menu.bindings = $();
+ $.each(items, function(index, item) {
+ if (item.category && item.category !== currentCategory) {
+ ul.append("" + categories[item.category] + " ");
+ currentCategory = item.category;
+ }
+ var li = widget._renderItemData(ul, item);
+ if (item.category) {
+ li.attr("aria-label", categories[item.category] + " : " + item.l);
+ } else {
+ li.attr("aria-label", item.l);
+ }
+ li.attr("class", "result-item");
+ });
+ ul.append("Go to search page ");
+ },
+ _renderItem: function(ul, item) {
+ var li = $(" ").appendTo(ul);
+ var div = $("
").appendTo(li);
+ var label = item.l
+ ? item.l
+ : getHighlightedText(item.input, item.boundaries, 0, item.input.length);
+ var idx = item.indexItem;
+ if (item.category === "searchTags" && idx && idx.h) {
+ if (idx.d) {
+ div.html(label + " (" + idx.h + ") "
+ + idx.d + " ");
+ } else {
+ div.html(label + " (" + idx.h + ") ");
+ }
+ } else {
+ div.html(label);
+ }
+ return li;
+ }
+});
+$(function() {
+ var expanded = false;
+ var windowWidth;
+ function collapse() {
+ if (expanded) {
+ $("div#navbar-top").removeAttr("style");
+ $("button#navbar-toggle-button")
+ .removeClass("expanded")
+ .attr("aria-expanded", "false");
+ expanded = false;
+ }
+ }
+ $("button#navbar-toggle-button").click(function (e) {
+ if (expanded) {
+ collapse();
+ } else {
+ var navbar = $("div#navbar-top");
+ navbar.height(navbar.prop("scrollHeight"));
+ $("button#navbar-toggle-button")
+ .addClass("expanded")
+ .attr("aria-expanded", "true");
+ expanded = true;
+ windowWidth = window.innerWidth;
+ }
+ });
+ $("ul.sub-nav-list-small li a").click(collapse);
+ $("input#search-input").focus(collapse);
+ $("main").click(collapse);
+ $("section[id] > :header, :header[id], :header:has(a[id])").each(function(idx, el) {
+ // Create anchor links for headers with an associated id attribute
+ var hdr = $(el);
+ var id = hdr.attr("id") || hdr.parent("section").attr("id") || hdr.children("a").attr("id");
+ if (id) {
+ hdr.append(" ");
+ }
+ });
+ $(window).on("orientationchange", collapse).on("resize", function(e) {
+ if (expanded && windowWidth !== window.innerWidth) collapse();
+ });
+ var search = $("#search-input");
+ var reset = $("#reset-button");
+ search.catcomplete({
+ minLength: 1,
+ delay: 200,
+ source: doSearch,
+ response: function(event, ui) {
+ if (!ui.content.length) {
+ ui.content.push({ l: messages.noResult });
+ } else {
+ $("#search-input").empty();
+ }
+ },
+ autoFocus: true,
+ focus: function(event, ui) {
+ return false;
+ },
+ position: {
+ collision: "flip"
+ },
+ select: function(event, ui) {
+ if (ui.item.indexItem) {
+ var url = getURL(ui.item.indexItem, ui.item.category);
+ window.location.href = pathtoroot + url;
+ $("#search-input").focus();
+ }
+ }
+ });
+ search.val('');
+ search.prop("disabled", false);
+ reset.prop("disabled", false);
+ reset.click(function() {
+ search.val('').focus();
+ });
+ search.focus();
+});
diff --git a/doc/serialized-form.html b/doc/serialized-form.html
new file mode 100644
index 0000000..867922b
--- /dev/null
+++ b/doc/serialized-form.html
@@ -0,0 +1,468 @@
+
+
+
+
+Serialized Form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+JavaScript is disabled on your browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Serialized Fields
+
+
+actionButton
+JButton actionButton
+Bouton pour afficher le texte
+
+
+cellValue
+int cellValue
+Valeur actuelle de la case
+
+
+col
+int col
+
+
+displayText
+String displayText
+Texte à afficher dans la case
+
+
+grille
+GMGrid grille
+
+
+isActive
+boolean isActive
+Statut de la case
+
+
+row
+int row
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Serialized Fields
+
+
+exportedGrid
+int[] exportedGrid
+
+
+gridCases
+GMCase [][] gridCases
+
+
+gridValues
+int[][] gridValues
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Serialized Fields
+
+
+BACKGROUND_COLOR
+Color BACKGROUND_COLOR
+
+
+FRAME_SIZE
+Dimension FRAME_SIZE
+
+
+TEXT
+String TEXT
+
+
+TEXT_COLOR
+Color TEXT_COLOR
+
+
+TEXT_FONT
+Font TEXT_FONT
+
+
+TITLE
+String TITLE
+
+
+TITLE_COLOR
+Color TITLE_COLOR
+
+
+TITLE_FONT
+Font TITLE_FONT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Serialized Fields
+
+
+activeX
+int activeX
+
+
+activeY
+int activeY
+
+
+cases
+GSCase [][] cases
+
+
+isPlaying
+Boolean isPlaying
+
+
+menu
+GSMenu menu
+
+
+tableauGrille
+int[][] tableauGrille
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Serialized Fields
+
+
+AUDIO_OFF
+String AUDIO_OFF
+
+
+AUDIO_ON
+String AUDIO_ON
+
+
+BACKGROUND_COLOR
+Color BACKGROUND_COLOR
+
+
+BUTTON_FONT
+Font BUTTON_FONT
+
+
+BUTTON_SIZE
+Dimension BUTTON_SIZE
+
+
+BUTTON_TEXTS
+String [] BUTTON_TEXTS
+
+
+buttonPanel
+JPanel buttonPanel
+
+
+buttonsList
+List <Button > buttonsList
+
+
+imageLabel
+JLabel imageLabel
+
+
+labels
+Title [] labels
+
+
+MUSIC_FILE
+String MUSIC_FILE
+
+
+musicButton
+MusicButton musicButton
+
+
+SUBTITLE_FONT
+Font SUBTITLE_FONT
+
+
+TITLE_FONT
+Font TITLE_FONT
+
+
+TITLE_TEXT_COLOR
+Color TITLE_TEXT_COLOR
+
+
+titlePanel
+JPanel titlePanel
+
+
+window
+Window window
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/stylesheet.css b/doc/stylesheet.css
new file mode 100644
index 0000000..f71489f
--- /dev/null
+++ b/doc/stylesheet.css
@@ -0,0 +1,1272 @@
+/*
+ * Javadoc style sheet
+ */
+
+@import url('resources/fonts/dejavu.css');
+
+/*
+ * These CSS custom properties (variables) define the core color and font
+ * properties used in this stylesheet.
+ */
+:root {
+ /* body, block and code fonts */
+ --body-font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;
+ --block-font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
+ --code-font-family: 'DejaVu Sans Mono', monospace;
+ /* Base font sizes for body and code elements */
+ --body-font-size: 14px;
+ --code-font-size: 14px;
+ /* Text colors for body and block elements */
+ --body-text-color: #353833;
+ --block-text-color: #474747;
+ /* Background colors for various structural elements */
+ --body-background-color: #ffffff;
+ --section-background-color: #f8f8f8;
+ --detail-background-color: #ffffff;
+ /* Colors for navigation bar and table captions */
+ --navbar-background-color: #4D7A97;
+ --navbar-text-color: #ffffff;
+ /* Background color for subnavigation and various headers */
+ --subnav-background-color: #dee3e9;
+ /* Background and text colors for selected tabs and navigation items */
+ --selected-background-color: #f8981d;
+ --selected-text-color: #253441;
+ --selected-link-color: #1f389c;
+ /* Background colors for generated tables */
+ --even-row-color: #ffffff;
+ --odd-row-color: #eeeeef;
+ /* Text color for page title */
+ --title-color: #2c4557;
+ /* Text colors for links */
+ --link-color: #4A6782;
+ --link-color-active: #bb7a2a;
+ /* Snippet colors */
+ --snippet-background-color: #ebecee;
+ --snippet-text-color: var(--block-text-color);
+ --snippet-highlight-color: #f7c590;
+ /* Border colors for structural elements and user defined tables */
+ --border-color: #ededed;
+ --table-border-color: #000000;
+ /* Search input colors */
+ --search-input-background-color: #ffffff;
+ --search-input-text-color: #000000;
+ --search-input-placeholder-color: #909090;
+ /* Highlight color for active search tag target */
+ --search-tag-highlight-color: #ffff00;
+ /* Adjustments for icon and active background colors of copy-to-clipboard buttons */
+ --copy-icon-brightness: 100%;
+ --copy-button-background-color-active: rgba(168, 168, 176, 0.3);
+ /* Colors for invalid tag notifications */
+ --invalid-tag-background-color: #ffe6e6;
+ --invalid-tag-text-color: #000000;
+}
+/*
+ * Styles for individual HTML elements.
+ *
+ * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
+ * HTML element throughout the page.
+ */
+body {
+ background-color:var(--body-background-color);
+ color:var(--body-text-color);
+ font-family:var(--body-font-family);
+ font-size:var(--body-font-size);
+ margin:0;
+ padding:0;
+ height:100%;
+ width:100%;
+}
+iframe {
+ margin:0;
+ padding:0;
+ height:100%;
+ width:100%;
+ overflow-y:scroll;
+ border:none;
+}
+a:link, a:visited {
+ text-decoration:none;
+ color:var(--link-color);
+}
+a[href]:hover, a[href]:focus {
+ text-decoration:none;
+ color:var(--link-color-active);
+}
+pre {
+ font-family:var(--code-font-family);
+ font-size:1em;
+}
+h1 {
+ font-size:1.428em;
+}
+h2 {
+ font-size:1.285em;
+}
+h3 {
+ font-size:1.14em;
+}
+h4 {
+ font-size:1.072em;
+}
+h5 {
+ font-size:1.001em;
+}
+h6 {
+ font-size:0.93em;
+}
+/* Disable font boosting for selected elements */
+h1, h2, h3, h4, h5, h6, div.member-signature {
+ max-height: 1000em;
+}
+ul {
+ list-style-type:disc;
+}
+code, tt {
+ font-family:var(--code-font-family);
+}
+:not(h1, h2, h3, h4, h5, h6) > code,
+:not(h1, h2, h3, h4, h5, h6) > tt {
+ font-size:var(--code-font-size);
+ padding-top:4px;
+ margin-top:8px;
+ line-height:1.4em;
+}
+dt code {
+ font-family:var(--code-font-family);
+ font-size:1em;
+ padding-top:4px;
+}
+.summary-table dt code {
+ font-family:var(--code-font-family);
+ font-size:1em;
+ vertical-align:top;
+ padding-top:4px;
+}
+sup {
+ font-size:8px;
+}
+button {
+ font-family: var(--body-font-family);
+ font-size: 1em;
+}
+/*
+ * Styles for HTML generated by javadoc.
+ *
+ * These are style classes that are used by the standard doclet to generate HTML documentation.
+ */
+
+/*
+ * Styles for document title and copyright.
+ */
+.about-language {
+ float:right;
+ padding:0 21px 8px 8px;
+ font-size:0.915em;
+ margin-top:-9px;
+ height:2.9em;
+}
+.legal-copy {
+ margin-left:.5em;
+}
+/*
+ * Styles for navigation bar.
+ */
+@media screen {
+ div.flex-box {
+ position:fixed;
+ display:flex;
+ flex-direction:column;
+ height: 100%;
+ width: 100%;
+ }
+ header.flex-header {
+ flex: 0 0 auto;
+ }
+ div.flex-content {
+ flex: 1 1 auto;
+ overflow-y: auto;
+ }
+}
+.top-nav {
+ background-color:var(--navbar-background-color);
+ color:var(--navbar-text-color);
+ float:left;
+ width:100%;
+ clear:right;
+ min-height:2.8em;
+ padding:10px 0 0 0;
+ overflow:hidden;
+ font-size:0.857em;
+}
+button#navbar-toggle-button {
+ display:none;
+}
+ul.sub-nav-list-small {
+ display: none;
+}
+.sub-nav {
+ background-color:var(--subnav-background-color);
+ float:left;
+ width:100%;
+ overflow:hidden;
+ font-size:0.857em;
+}
+.sub-nav div {
+ clear:left;
+ float:left;
+ padding:6px;
+ text-transform:uppercase;
+}
+.sub-nav .sub-nav-list {
+ padding-top:4px;
+}
+ul.nav-list {
+ display:block;
+ margin:0 25px 0 0;
+ padding:0;
+}
+ul.sub-nav-list {
+ float:left;
+ margin:0 25px 0 0;
+ padding:0;
+}
+ul.nav-list li {
+ list-style:none;
+ float:left;
+ padding: 5px 6px;
+ text-transform:uppercase;
+}
+.sub-nav .nav-list-search {
+ float:right;
+ margin:0;
+ padding:6px;
+ clear:none;
+ text-align:right;
+ position:relative;
+}
+ul.sub-nav-list li {
+ list-style:none;
+ float:left;
+}
+.top-nav a:link, .top-nav a:active, .top-nav a:visited {
+ color:var(--navbar-text-color);
+ text-decoration:none;
+ text-transform:uppercase;
+}
+.top-nav a:hover {
+ color:var(--link-color-active);
+}
+.nav-bar-cell1-rev {
+ background-color:var(--selected-background-color);
+ color:var(--selected-text-color);
+ margin: auto 5px;
+}
+.skip-nav {
+ position:absolute;
+ top:auto;
+ left:-9999px;
+ overflow:hidden;
+}
+/*
+ * Hide navigation links and search box in print layout
+ */
+@media print {
+ ul.nav-list, div.sub-nav {
+ display:none;
+ }
+}
+/*
+ * Styles for page header.
+ */
+.title {
+ color:var(--title-color);
+ margin:10px 0;
+}
+.sub-title {
+ margin:5px 0 0 0;
+}
+ul.contents-list {
+ margin: 0 0 15px 0;
+ padding: 0;
+ list-style: none;
+}
+ul.contents-list li {
+ font-size:0.93em;
+}
+/*
+ * Styles for headings.
+ */
+body.class-declaration-page .summary h2,
+body.class-declaration-page .details h2,
+body.class-use-page h2,
+body.module-declaration-page .block-list h2 {
+ font-style: italic;
+ padding:0;
+ margin:15px 0;
+}
+body.class-declaration-page .summary h3,
+body.class-declaration-page .details h3,
+body.class-declaration-page .summary .inherited-list h2 {
+ background-color:var(--subnav-background-color);
+ border:1px solid var(--border-color);
+ margin:0 0 6px -8px;
+ padding:7px 5px;
+}
+/*
+ * Styles for page layout containers.
+ */
+main {
+ clear:both;
+ padding:10px 20px;
+ position:relative;
+}
+dl.notes > dt {
+ font-family: var(--body-font-family);
+ font-size:0.856em;
+ font-weight:bold;
+ margin:10px 0 0 0;
+ color:var(--body-text-color);
+}
+dl.notes > dd {
+ margin:5px 10px 10px 0;
+ font-size:1em;
+ font-family:var(--block-font-family)
+}
+dl.name-value > dt {
+ margin-left:1px;
+ font-size:1.1em;
+ display:inline;
+ font-weight:bold;
+}
+dl.name-value > dd {
+ margin:0 0 0 1px;
+ font-size:1.1em;
+ display:inline;
+}
+/*
+ * Styles for lists.
+ */
+li.circle {
+ list-style:circle;
+}
+ul.horizontal li {
+ display:inline;
+ font-size:0.9em;
+}
+div.inheritance {
+ margin:0;
+ padding:0;
+}
+div.inheritance div.inheritance {
+ margin-left:2em;
+}
+ul.block-list,
+ul.details-list,
+ul.member-list,
+ul.summary-list {
+ margin:10px 0 10px 0;
+ padding:0;
+}
+ul.block-list > li,
+ul.details-list > li,
+ul.member-list > li,
+ul.summary-list > li {
+ list-style:none;
+ margin-bottom:15px;
+ line-height:1.4;
+}
+ul.ref-list {
+ padding:0;
+ margin:0;
+}
+ul.ref-list > li {
+ list-style:none;
+}
+.summary-table dl, .summary-table dl dt, .summary-table dl dd {
+ margin-top:0;
+ margin-bottom:1px;
+}
+ul.tag-list, ul.tag-list-long {
+ padding-left: 0;
+ list-style: none;
+}
+ul.tag-list li {
+ display: inline;
+}
+ul.tag-list li:not(:last-child):after,
+ul.tag-list-long li:not(:last-child):after
+{
+ content: ", ";
+ white-space: pre-wrap;
+}
+ul.preview-feature-list {
+ list-style: none;
+ margin:0;
+ padding:0.1em;
+ line-height: 1.6em;
+}
+/*
+ * Styles for tables.
+ */
+.summary-table, .details-table {
+ width:100%;
+ border-spacing:0;
+ border:1px solid var(--border-color);
+ border-top:0;
+ padding:0;
+}
+.caption {
+ position:relative;
+ text-align:left;
+ background-repeat:no-repeat;
+ color:var(--selected-text-color);
+ clear:none;
+ overflow:hidden;
+ padding: 10px 0 0 1px;
+ margin:0;
+}
+.caption a:link, .caption a:visited {
+ color:var(--selected-link-color);
+}
+.caption a:hover,
+.caption a:active {
+ color:var(--navbar-text-color);
+}
+.caption span {
+ font-weight:bold;
+ white-space:nowrap;
+ padding:5px 12px 7px 12px;
+ display:inline-block;
+ float:left;
+ background-color:var(--selected-background-color);
+ border: none;
+ height:16px;
+}
+div.table-tabs {
+ padding:10px 0 0 1px;
+ margin:10px 0 0 0;
+}
+div.table-tabs > button {
+ border: none;
+ cursor: pointer;
+ padding: 5px 12px 7px 12px;
+ font-weight: bold;
+ margin-right: 8px;
+}
+div.table-tabs > .active-table-tab {
+ background: var(--selected-background-color);
+ color: var(--selected-text-color);
+}
+div.table-tabs > button.table-tab {
+ background: var(--navbar-background-color);
+ color: var(--navbar-text-color);
+}
+.two-column-search-results {
+ display: grid;
+ grid-template-columns: minmax(400px, max-content) minmax(400px, auto);
+}
+div.checkboxes {
+ line-height: 2em;
+}
+div.checkboxes > span {
+ margin-left: 10px;
+}
+div.checkboxes > label {
+ margin-left: 8px;
+ white-space: nowrap;
+}
+div.checkboxes > label > input {
+ margin: 0 2px;
+}
+.two-column-summary {
+ display: grid;
+ grid-template-columns: minmax(25%, max-content) minmax(25%, auto);
+}
+.three-column-summary {
+ display: grid;
+ grid-template-columns: minmax(15%, max-content) minmax(20%, max-content) minmax(20%, auto);
+}
+.three-column-release-summary {
+ display: grid;
+ grid-template-columns: minmax(40%, max-content) minmax(10%, max-content) minmax(40%, auto);
+}
+.four-column-summary {
+ display: grid;
+ grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, max-content) minmax(15%, auto);
+}
+@media screen and (max-width: 1000px) {
+ .four-column-summary {
+ display: grid;
+ grid-template-columns: minmax(15%, max-content) minmax(15%, auto);
+ }
+}
+@media screen and (max-width: 800px) {
+ .two-column-search-results {
+ display: grid;
+ grid-template-columns: minmax(40%, max-content) minmax(40%, auto);
+ }
+ .three-column-summary {
+ display: grid;
+ grid-template-columns: minmax(10%, max-content) minmax(25%, auto);
+ }
+ .three-column-release-summary {
+ display: grid;
+ grid-template-columns: minmax(70%, max-content) minmax(30%, max-content)
+ }
+ .three-column-summary .col-last,
+ .three-column-release-summary .col-last{
+ grid-column-end: span 2;
+ }
+}
+@media screen and (max-width: 600px) {
+ .two-column-summary {
+ display: grid;
+ grid-template-columns: 1fr;
+ }
+}
+.summary-table > div, .details-table > div {
+ text-align:left;
+ padding: 8px 3px 3px 7px;
+ overflow-x: auto;
+ scrollbar-width: thin;
+}
+.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name {
+ vertical-align:top;
+ padding-right:0;
+ padding-top:8px;
+ padding-bottom:3px;
+}
+.table-header {
+ background:var(--subnav-background-color);
+ font-weight: bold;
+}
+/* Sortable table columns */
+.table-header[onclick] {
+ cursor: pointer;
+}
+.table-header[onclick]::after {
+ content:"";
+ display:inline-block;
+ background-image:url('data:image/svg+xml; utf8, \
+ \
+ ');
+ background-size:100% 100%;
+ width:9px;
+ height:14px;
+ margin-left:4px;
+ margin-bottom:-3px;
+}
+.table-header[onclick].sort-asc::after {
+ background-image:url('data:image/svg+xml; utf8, \
+ \
+ \
+ ');
+
+}
+.table-header[onclick].sort-desc::after {
+ background-image:url('data:image/svg+xml; utf8, \
+ \
+ \
+ ');
+}
+.col-first, .col-first {
+ font-size:0.93em;
+}
+.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last {
+ font-size:0.93em;
+}
+.col-first, .col-second, .col-constructor-name {
+ vertical-align:top;
+ overflow: auto;
+}
+.col-last {
+ white-space:normal;
+}
+.col-first a:link, .col-first a:visited,
+.col-second a:link, .col-second a:visited,
+.col-first a:link, .col-first a:visited,
+.col-second a:link, .col-second a:visited,
+.col-constructor-name a:link, .col-constructor-name a:visited,
+.col-summary-item-name a:link, .col-summary-item-name a:visited {
+ font-weight:bold;
+}
+.even-row-color, .even-row-color .table-header {
+ background-color:var(--even-row-color);
+}
+.odd-row-color, .odd-row-color .table-header {
+ background-color:var(--odd-row-color);
+}
+/*
+ * Styles for contents.
+ */
+div.block {
+ font-size:var(--body-font-size);
+ font-family:var(--block-font-family);
+}
+.col-last div {
+ padding-top:0;
+}
+.col-last a {
+ padding-bottom:3px;
+}
+.module-signature,
+.package-signature,
+.type-signature,
+.member-signature {
+ font-family:var(--code-font-family);
+ font-size:1em;
+ margin:14px 0;
+ white-space: pre-wrap;
+}
+.module-signature,
+.package-signature,
+.type-signature {
+ margin-top: 0;
+}
+.member-signature .type-parameters-long,
+.member-signature .parameters,
+.member-signature .exceptions {
+ display: inline-block;
+ vertical-align: top;
+ white-space: pre;
+}
+.member-signature .type-parameters {
+ white-space: normal;
+}
+/*
+ * Styles for formatting effect.
+ */
+.source-line-no {
+ /* Color of line numbers in source pages can be set via custom property below */
+ color:var(--source-linenumber-color, green);
+ padding:0 30px 0 0;
+}
+.block {
+ display:block;
+ margin:0 10px 5px 0;
+ color:var(--block-text-color);
+}
+.deprecated-label, .description-from-type-label, .implementation-label, .member-name-link,
+.module-label-in-package, .module-label-in-type, .package-label-in-type,
+.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label {
+ font-weight:bold;
+}
+.deprecation-comment, .help-footnote, .preview-comment {
+ font-style:italic;
+}
+.deprecation-block {
+ font-size:1em;
+ font-family:var(--block-font-family);
+ border-style:solid;
+ border-width:thin;
+ border-radius:10px;
+ padding:10px;
+ margin-bottom:10px;
+ margin-right:10px;
+ display:inline-block;
+}
+.preview-block {
+ font-size:1em;
+ font-family:var(--block-font-family);
+ border-style:solid;
+ border-width:thin;
+ border-radius:10px;
+ padding:10px;
+ margin-bottom:10px;
+ margin-right:10px;
+ display:inline-block;
+}
+div.block div.deprecation-comment {
+ font-style:normal;
+}
+details.invalid-tag, span.invalid-tag {
+ font-size:1em;
+ font-family:var(--block-font-family);
+ color: var(--invalid-tag-text-color);
+ background: var(--invalid-tag-background-color);
+ border: thin solid var(--table-border-color);
+ border-radius:2px;
+ padding: 2px 4px;
+ display:inline-block;
+}
+details summary {
+ cursor: pointer;
+}
+/*
+ * Styles specific to HTML5 elements.
+ */
+main, nav, header, footer, section {
+ display:block;
+}
+/*
+ * Styles for javadoc search.
+ */
+.ui-state-active {
+ /* Overrides the color of selection used in jQuery UI */
+ background: var(--selected-background-color);
+ border: 1px solid var(--selected-background-color);
+ color: var(--selected-text-color);
+}
+.ui-autocomplete-category {
+ font-weight:bold;
+ font-size:15px;
+ padding:7px 0 7px 3px;
+ background-color:var(--navbar-background-color);
+ color:var(--navbar-text-color);
+}
+.ui-autocomplete {
+ max-height:85%;
+ max-width:65%;
+ overflow-y:auto;
+ overflow-x:auto;
+ scrollbar-width: thin;
+ white-space:nowrap;
+ box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
+}
+ul.ui-autocomplete {
+ position:fixed;
+ z-index:1;
+ background-color: var(--body-background-color);
+}
+ul.ui-autocomplete li {
+ float:left;
+ clear:both;
+ min-width:100%;
+}
+ul.ui-autocomplete li.ui-static-link {
+ position:sticky;
+ bottom:0;
+ left:0;
+ background: var(--subnav-background-color);
+ padding: 5px 0;
+ font-family: var(--body-font-family);
+ font-size: 0.93em;
+ font-weight: bolder;
+ z-index: 2;
+}
+li.ui-static-link a, li.ui-static-link a:visited {
+ text-decoration:none;
+ color:var(--link-color);
+ float:right;
+ margin-right:20px;
+}
+.ui-autocomplete .result-item {
+ font-size: inherit;
+}
+.ui-autocomplete .result-highlight {
+ font-weight:bold;
+}
+#search-input, #page-search-input {
+ background-image:url('resources/glass.png');
+ background-size:13px;
+ background-repeat:no-repeat;
+ background-position:2px 3px;
+ background-color: var(--search-input-background-color);
+ color: var(--search-input-text-color);
+ border-color: var(--border-color);
+ padding-left:20px;
+ width: 250px;
+ margin: 0;
+}
+#search-input {
+ margin-left: 4px;
+}
+#reset-button {
+ background-color: transparent;
+ background-image:url('resources/x.png');
+ background-repeat:no-repeat;
+ background-size:contain;
+ border:0;
+ border-radius:0;
+ width:12px;
+ height:12px;
+ position:absolute;
+ right:12px;
+ top:10px;
+ font-size:0;
+}
+::placeholder {
+ color:var(--search-input-placeholder-color);
+ opacity: 1;
+}
+.search-tag-desc-result {
+ font-style:italic;
+ font-size:11px;
+}
+.search-tag-holder-result {
+ font-style:italic;
+ font-size:12px;
+}
+.search-tag-result:target {
+ background-color:var(--search-tag-highlight-color);
+}
+details.page-search-details {
+ display: inline-block;
+}
+div#result-container {
+ font-size: 1em;
+}
+div#result-container a.search-result-link {
+ padding: 0;
+ margin: 4px 0;
+ width: 100%;
+}
+#result-container .result-highlight {
+ font-weight:bolder;
+}
+.page-search-info {
+ background-color: var(--subnav-background-color);
+ border-radius: 3px;
+ border: 0 solid var(--border-color);
+ padding: 0 8px;
+ overflow: hidden;
+ height: 0;
+ transition: all 0.2s ease;
+}
+div.table-tabs > button.table-tab {
+ background: var(--navbar-background-color);
+ color: var(--navbar-text-color);
+}
+.page-search-header {
+ padding: 5px 12px 7px 12px;
+ font-weight: bold;
+ margin-right: 3px;
+ background-color:var(--navbar-background-color);
+ color:var(--navbar-text-color);
+ display: inline-block;
+}
+button.page-search-header {
+ border: none;
+ cursor: pointer;
+}
+span#page-search-link {
+ text-decoration: underline;
+}
+.module-graph span, .sealed-graph span {
+ display:none;
+ position:absolute;
+}
+.module-graph:hover span, .sealed-graph:hover span {
+ display:block;
+ margin: -100px 0 0 100px;
+ z-index: 1;
+}
+.inherited-list {
+ margin: 10px 0 10px 0;
+}
+section.class-description {
+ line-height: 1.4;
+}
+.summary section[class$="-summary"], .details section[class$="-details"],
+.class-uses .detail, .serialized-class-details {
+ padding: 0 20px 5px 10px;
+ border: 1px solid var(--border-color);
+ background-color: var(--section-background-color);
+}
+.inherited-list, section[class$="-details"] .detail {
+ padding:0 0 5px 8px;
+ background-color:var(--detail-background-color);
+ border:none;
+}
+.vertical-separator {
+ padding: 0 5px;
+}
+ul.help-section-list {
+ margin: 0;
+}
+ul.help-subtoc > li {
+ display: inline-block;
+ padding-right: 5px;
+ font-size: smaller;
+}
+ul.help-subtoc > li::before {
+ content: "\2022" ;
+ padding-right:2px;
+}
+.help-note {
+ font-style: italic;
+}
+/*
+ * Indicator icon for external links.
+ */
+main a[href*="://"]::after {
+ content:"";
+ display:inline-block;
+ background-image:url('data:image/svg+xml; utf8, \
+ \
+ \
+ ');
+ background-size:100% 100%;
+ width:7px;
+ height:7px;
+ margin-left:2px;
+ margin-bottom:4px;
+}
+main a[href*="://"]:hover::after,
+main a[href*="://"]:focus::after {
+ background-image:url('data:image/svg+xml; utf8, \
+ \
+ \
+ ');
+}
+/*
+ * Styles for header/section anchor links
+ */
+a.anchor-link {
+ opacity: 0;
+ transition: opacity 0.1s;
+}
+:hover > a.anchor-link {
+ opacity: 80%;
+}
+a.anchor-link:hover,
+a.anchor-link:focus-visible,
+a.anchor-link.visible {
+ opacity: 100%;
+}
+a.anchor-link > img {
+ width: 0.9em;
+ height: 0.9em;
+}
+/*
+ * Styles for copy-to-clipboard buttons
+ */
+button.copy {
+ opacity: 70%;
+ border: none;
+ border-radius: 3px;
+ position: relative;
+ background:none;
+ transition: opacity 0.3s;
+ cursor: pointer;
+}
+:hover > button.copy {
+ opacity: 80%;
+}
+button.copy:hover,
+button.copy:active,
+button.copy:focus-visible,
+button.copy.visible {
+ opacity: 100%;
+}
+button.copy img {
+ position: relative;
+ background: none;
+ filter: brightness(var(--copy-icon-brightness));
+}
+button.copy:active {
+ background-color: var(--copy-button-background-color-active);
+}
+button.copy span {
+ color: var(--body-text-color);
+ position: relative;
+ top: -0.1em;
+ transition: all 0.1s;
+ font-size: 0.76rem;
+ line-height: 1.2em;
+ opacity: 0;
+}
+button.copy:hover span,
+button.copy:focus-visible span,
+button.copy.visible span {
+ opacity: 100%;
+}
+/* search page copy button */
+button#page-search-copy {
+ margin-left: 0.4em;
+ padding:0.3em;
+ top:0.13em;
+}
+button#page-search-copy img {
+ width: 1.2em;
+ height: 1.2em;
+ padding: 0.01em 0;
+ top: 0.15em;
+}
+button#page-search-copy span {
+ color: var(--body-text-color);
+ line-height: 1.2em;
+ padding: 0.2em;
+ top: -0.18em;
+}
+div.page-search-info:hover button#page-search-copy span {
+ opacity: 100%;
+}
+/* snippet copy button */
+button.snippet-copy {
+ position: absolute;
+ top: 6px;
+ right: 6px;
+ height: 1.7em;
+ padding: 2px;
+}
+button.snippet-copy img {
+ width: 18px;
+ height: 18px;
+ padding: 0.05em 0;
+}
+button.snippet-copy span {
+ line-height: 1.2em;
+ padding: 0.2em;
+ position: relative;
+ top: -0.5em;
+}
+div.snippet-container:hover button.snippet-copy span {
+ opacity: 100%;
+}
+/*
+ * Styles for user-provided tables.
+ *
+ * borderless:
+ * No borders, vertical margins, styled caption.
+ * This style is provided for use with existing doc comments.
+ * In general, borderless tables should not be used for layout purposes.
+ *
+ * plain:
+ * Plain borders around table and cells, vertical margins, styled caption.
+ * Best for small tables or for complex tables for tables with cells that span
+ * rows and columns, when the "striped" style does not work well.
+ *
+ * striped:
+ * Borders around the table and vertical borders between cells, striped rows,
+ * vertical margins, styled caption.
+ * Best for tables that have a header row, and a body containing a series of simple rows.
+ */
+
+table.borderless,
+table.plain,
+table.striped {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+table.borderless > caption,
+table.plain > caption,
+table.striped > caption {
+ font-weight: bold;
+ font-size: smaller;
+}
+table.borderless th, table.borderless td,
+table.plain th, table.plain td,
+table.striped th, table.striped td {
+ padding: 2px 5px;
+}
+table.borderless,
+table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
+table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
+ border: none;
+}
+table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
+ background-color: transparent;
+}
+table.plain {
+ border-collapse: collapse;
+ border: 1px solid var(--table-border-color);
+}
+table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
+ background-color: transparent;
+}
+table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
+table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
+ border: 1px solid var(--table-border-color);
+}
+table.striped {
+ border-collapse: collapse;
+ border: 1px solid var(--table-border-color);
+}
+table.striped > thead {
+ background-color: var(--subnav-background-color);
+}
+table.striped > thead > tr > th, table.striped > thead > tr > td {
+ border: 1px solid var(--table-border-color);
+}
+table.striped > tbody > tr:nth-child(even) {
+ background-color: var(--odd-row-color)
+}
+table.striped > tbody > tr:nth-child(odd) {
+ background-color: var(--even-row-color)
+}
+table.striped > tbody > tr > th, table.striped > tbody > tr > td {
+ border-left: 1px solid var(--table-border-color);
+ border-right: 1px solid var(--table-border-color);
+}
+table.striped > tbody > tr > th {
+ font-weight: normal;
+}
+/**
+ * Tweak style for small screens.
+ */
+@media screen and (max-width: 920px) {
+ header.flex-header {
+ max-height: 100vh;
+ overflow-y: auto;
+ }
+ div#navbar-top {
+ height: 2.8em;
+ transition: height 0.35s ease;
+ }
+ ul.nav-list {
+ display: block;
+ width: 40%;
+ float:left;
+ clear: left;
+ margin: 10px 0 0 0;
+ padding: 0;
+ }
+ ul.nav-list li {
+ float: none;
+ padding: 6px;
+ margin-left: 10px;
+ margin-top: 2px;
+ }
+ ul.sub-nav-list-small {
+ display:block;
+ height: 100%;
+ width: 50%;
+ float: right;
+ clear: right;
+ background-color: var(--subnav-background-color);
+ color: var(--body-text-color);
+ margin: 6px 0 0 0;
+ padding: 0;
+ }
+ ul.sub-nav-list-small ul {
+ padding-left: 20px;
+ }
+ ul.sub-nav-list-small a:link, ul.sub-nav-list-small a:visited {
+ color:var(--link-color);
+ }
+ ul.sub-nav-list-small a:hover {
+ color:var(--link-color-active);
+ }
+ ul.sub-nav-list-small li {
+ list-style:none;
+ float:none;
+ padding: 6px;
+ margin-top: 1px;
+ text-transform:uppercase;
+ }
+ ul.sub-nav-list-small > li {
+ margin-left: 10px;
+ }
+ ul.sub-nav-list-small li p {
+ margin: 5px 0;
+ }
+ div#navbar-sub-list {
+ display: none;
+ }
+ .top-nav a:link, .top-nav a:active, .top-nav a:visited {
+ display: block;
+ }
+ button#navbar-toggle-button {
+ width: 3.4em;
+ height: 2.8em;
+ background-color: transparent;
+ display: block;
+ float: left;
+ border: 0;
+ margin: 0 10px;
+ cursor: pointer;
+ font-size: 10px;
+ }
+ button#navbar-toggle-button .nav-bar-toggle-icon {
+ display: block;
+ width: 24px;
+ height: 3px;
+ margin: 1px 0 4px 0;
+ border-radius: 2px;
+ transition: all 0.1s;
+ background-color: var(--navbar-text-color);
+ }
+ button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(1) {
+ transform: rotate(45deg);
+ transform-origin: 10% 10%;
+ width: 26px;
+ }
+ button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(2) {
+ opacity: 0;
+ }
+ button#navbar-toggle-button.expanded span.nav-bar-toggle-icon:nth-child(3) {
+ transform: rotate(-45deg);
+ transform-origin: 10% 90%;
+ width: 26px;
+ }
+}
+@media screen and (max-width: 800px) {
+ .about-language {
+ padding-right: 16px;
+ }
+ ul.nav-list li {
+ margin-left: 5px;
+ }
+ ul.sub-nav-list-small > li {
+ margin-left: 5px;
+ }
+ main {
+ padding: 10px;
+ }
+ .summary section[class$="-summary"], .details section[class$="-details"],
+ .class-uses .detail, .serialized-class-details {
+ padding: 0 8px 5px 8px;
+ }
+ body {
+ -webkit-text-size-adjust: none;
+ }
+}
+@media screen and (max-width: 400px) {
+ .about-language {
+ font-size: 10px;
+ padding-right: 12px;
+ }
+}
+@media screen and (max-width: 400px) {
+ .nav-list-search {
+ width: 94%;
+ }
+ #search-input, #page-search-input {
+ width: 70%;
+ }
+}
+@media screen and (max-width: 320px) {
+ .nav-list-search > label {
+ display: none;
+ }
+ .nav-list-search {
+ width: 90%;
+ }
+ #search-input, #page-search-input {
+ width: 80%;
+ }
+}
+
+pre.snippet {
+ background-color: var(--snippet-background-color);
+ color: var(--snippet-text-color);
+ padding: 10px;
+ margin: 12px 0;
+ overflow: auto;
+ white-space: pre;
+}
+div.snippet-container {
+ position: relative;
+}
+@media screen and (max-width: 800px) {
+ pre.snippet {
+ padding-top: 26px;
+ }
+ button.snippet-copy {
+ top: 4px;
+ right: 4px;
+ }
+}
+pre.snippet .italic {
+ font-style: italic;
+}
+pre.snippet .bold {
+ font-weight: bold;
+}
+pre.snippet .highlighted {
+ background-color: var(--snippet-highlight-color);
+ border-radius: 10%;
+}
diff --git a/doc/tag-search-index.js b/doc/tag-search-index.js
new file mode 100644
index 0000000..f38b3cb
--- /dev/null
+++ b/doc/tag-search-index.js
@@ -0,0 +1 @@
+tagSearchIndex = [{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults();
\ No newline at end of file
diff --git a/doc/type-search-index.js b/doc/type-search-index.js
new file mode 100644
index 0000000..6d22e86
--- /dev/null
+++ b/doc/type-search-index.js
@@ -0,0 +1 @@
+typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"","l":"Button"},{"p":"","l":"CongratulationsDialog"},{"p":"","l":"DialogManager"},{"p":"","l":"GMCase"},{"p":"","l":"GMCaseKeyListener"},{"p":"","l":"GMCaseMouseListener"},{"p":"","l":"GMChecker"},{"p":"","l":"GMGrid"},{"p":"","l":"GMHowToCreateController"},{"p":"","l":"GMHowToCreateDialogManager"},{"p":"","l":"GMHowToCreateView"},{"p":"","l":"GMImport"},{"p":"","l":"GMResetGrid"},{"p":"","l":"GMRules"},{"p":"","l":"GMSaver"},{"p":"","l":"GMSaverActionListener"},{"p":"","l":"GMUserInterfaceController"},{"p":"","l":"GMUserInterfaceView"},{"p":"","l":"GridMaker"},{"p":"","l":"GridSolver"},{"p":"","l":"GSCase"},{"p":"","l":"GSCaseMouseListener"},{"p":"","l":"GSGrid"},{"p":"","l":"GSImport"},{"p":"","l":"GSMenu"},{"p":"","l":"GSMenuController"},{"p":"","l":"GSPlay"},{"p":"","l":"GSPlayController"},{"p":"","l":"GSSolver"},{"p":"","l":"GSTest"},{"p":"","l":"GSWin"},{"p":"","l":"HomeButtonClickListener"},{"p":"","l":"HomeView"},{"p":"","l":"MusicButton"},{"p":"","l":"MusicPlayer"},{"p":"","l":"RulesDialogManager"},{"p":"","l":"RulesSudoku"},{"p":"","l":"Title"},{"p":"","l":"Window"}];updateSearchResults();
\ No newline at end of file
diff --git a/src/GMChecker.java b/src/GMChecker.java
index 5a7ef15..620cbbb 100755
--- a/src/GMChecker.java
+++ b/src/GMChecker.java
@@ -1,14 +1,16 @@
import javax.swing.*;
/**
- * La classe GMChecker est utilisée pour vérifier la cohérence de la grille.
+ * GMChecker est utilisée pour vérifier la cohérence de la grille.
* Elle vérifie si les lignes, les colonnes et les régions de la grille respectent les règles du jeu.
* @version 1.0
* @author Moncef STITI
* @author Marco ORFAO
*/
public class GMChecker {
-
+ /**
+ * La grille
+ */
private GMGrid grid;
/**
diff --git a/src/GMHomeButtonClickListener.java b/src/GMHomeButtonClickListener.java
deleted file mode 100644
index f00c48b..0000000
--- a/src/GMHomeButtonClickListener.java
+++ /dev/null
@@ -1,46 +0,0 @@
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-/**
- * Listener for button clicks in the menu.
- * It performs different actions based on the button clicked.
- * @version 1.0
- * @author Moncef STITI
- * @author Marco ORFAO
- */
-class GMHomeButtonClickListener implements ActionListener {
- private Window window;
- private DialogManager rulesDialogManager;
-
- /**
- * Constructs a ButtonClickListener with the specified window.
- * @param window The window where the actions will be performed.
- */
- public GMHomeButtonClickListener(Window window) {
- this.window = window;
- this.rulesDialogManager = new RulesDialogManager();
- }
-
- /**
- * Performs an action based on the button clicked.
- * @param e The ActionEvent representing the button click.
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- String buttonText = ((Button) e.getSource()).getText();
- switch (buttonText) {
- case "Générer une grille":
- Window.removeAllComponents(this.window);
- GMUserInterfaceView vueCreationGrille = new GMUserInterfaceView(this.window); // Lancer le créateur de grille
- break;
- case "Règles":
- rulesDialogManager.showDialog(); // Afficher les règles
- break;
- case "Quitter":
- System.exit(0); // Quitter le programme
- break;
- default:
- break;
- }
- }
-}
diff --git a/src/GSCase.java b/src/GSCase.java
index 0601c6c..97194d7 100755
--- a/src/GSCase.java
+++ b/src/GSCase.java
@@ -17,7 +17,7 @@ public class GSCase extends JPanel {
private String text = ""; // Texte affiché dans la case
protected boolean isInitial = false; // Indique si la valeur de la case est initiale
- protected boolean isActive; // Indique si la case est active
+ protected boolean isActive = true; // Indique si la case est active
private JLabel label = new JLabel(); // Étiquette pour afficher le texte
private byte digitCount = 0; // Compteur du nombre de valeurs insérées dans la case
protected int positionX; // Position X de la case dans la grille
diff --git a/src/GSHomeButtonClickListener.java b/src/GSHomeButtonClickListener.java
deleted file mode 100644
index 661434c..0000000
--- a/src/GSHomeButtonClickListener.java
+++ /dev/null
@@ -1,48 +0,0 @@
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-/**
- * Listener pour les clics sur les boutons dans le menu.
- * Il effectue différentes actions en fonction du bouton cliqué.
- * @version 1.0
- * @author Moncef STITI
- * @author Marco ORFAO
- */
-class GSHomeButtonClickListener implements ActionListener {
- private Window window;
- private DialogManager rulesDialogManager;
- private GSMenu menuJeu;
-
- /**
- * Construit un ButtonClickListener avec la fenêtre spécifiée.
- * @param window La fenêtre où les actions seront effectuées.
- */
- public GSHomeButtonClickListener(Window window) {
- this.window = window;
- this.rulesDialogManager = new RulesDialogManager();
- }
-
- /**
- * Effectue une action en fonction du bouton cliqué.
- * @param e L'ActionEvent représentant le clic sur le bouton.
- */
- @Override
- public void actionPerformed(ActionEvent e) {
- String buttonText = ((Button) e.getSource()).getText();
- switch (buttonText) {
- case "Jouer":
- Window.removeAllComponents(this.window);
- this.menuJeu = new GSMenu(this.window);
- GSMenuController menuController = new GSMenuController(this.menuJeu, this.window);
- break;
- case "Règles":
- rulesDialogManager.showDialog(); // Afficher les règles
- break;
- case "Quitter":
- System.exit(0); // Quitter le programme
- break;
- default:
- break;
- }
- }
-}
diff --git a/src/GSHomeView.java b/src/GSHomeView.java
deleted file mode 100644
index c9c04e7..0000000
--- a/src/GSHomeView.java
+++ /dev/null
@@ -1,103 +0,0 @@
-import javax.swing.*;
-import java.awt.*;
-
-/**
- * HomeView représente la vue de la page d'accueil de l'application Sudoku.
- * Cette classe étend JPanel et affiche les éléments de la page d'accueil, y compris le titre, les boutons et les contrôles audio.
- * Elle utilise également les classes Title, Button, et MusicButton.
- *
- * @version 1.0
- * @author Moncef STITI
- * @author Marco ORFAO
- */
-public class GSHomeView extends JPanel {
-
- // Constantes pour les chemins des icônes et des fichiers audio, ainsi que pour les dimensions et les couleurs
- private final String AUDIO_ON = "img/iconeAudio.png";
- private final String AUDIO_OFF = "img/iconeAudioMuted.png";
- private final String MUSIC_FILE = "audio/musiqueDeFond.wav";
- private final Dimension BUTTON_SIZE = new Dimension(300, 60);
- private final Color BACKGROUND_COLOR = new Color(54, 91, 109);
- private final Color TITLE_TEXT_COLOR = Color.WHITE;
- private final Font TITLE_FONT = new Font("Copperplate", Font.BOLD, 75);
- private final Font SUBTITLE_FONT = new Font("Copperplate", Font.PLAIN, 24);
- private final Font BUTTON_FONT = new Font("Copperplate", Font.BOLD, 24);
- private final String[] BUTTON_TEXTS = {"Jouer", "Règles", "Quitter"};
-
- // Tableau de titres pour le titre principal et le sous-titre
- private final Title[] labels = {
- new Title("Sudoku Game", TITLE_FONT, TITLE_TEXT_COLOR),
- new Title("Par Moncef & Marco", SUBTITLE_FONT, TITLE_TEXT_COLOR)
- };
-
- private MusicButton musicButton; // Bouton pour contrôler la musique
- private final Window window; // Fenêtre parente
- private JPanel titlePanel; // Panneau pour le titre
- private JPanel buttonPanel; // Panneau pour les boutons
- private JLabel imageLabel; // Étiquette pour l'image
-
- /**
- * Constructeur de la classe HomeView.
- * Initialise la fenêtre parente et crée les composants de la page d'accueil.
- * @param window La fenêtre parente.
- */
- public GSHomeView(Window window) {
- this.window = window;
- createComponents();
- addComponentsToWindow();
- }
-
- /**
- * Crée les composants de la page d'accueil, y compris les panneaux de titre et de boutons.
- */
- private void createComponents() {
- titlePanel = new JPanel();
- buttonPanel = new JPanel();
- ImageIcon iconeSudoku = new ImageIcon("img/sudoku.png");
- imageLabel = new JLabel(iconeSudoku);
-
- // Configuration du panneau de titre
- GridLayout titleLayout = new GridLayout(2, 1);
- titlePanel.setLayout(titleLayout);
- titlePanel.setBackground(BACKGROUND_COLOR);
- // Utilisation de la classe Title pour le titre et le sous-titre
- for (Title label : labels) {
- titlePanel.add(label);
- }
-
- // Configuration du panneau de boutons
- GridLayout buttonLayout = new GridLayout(BUTTON_TEXTS.length, 1, 0, 10);
- buttonPanel.setLayout(buttonLayout);
- buttonPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
- buttonPanel.setBackground(BACKGROUND_COLOR);
- GSHomeButtonClickListener listenerButton = new GSHomeButtonClickListener(window);
- for (String text : BUTTON_TEXTS) {
- Button button = new Button(text, BUTTON_SIZE, BUTTON_FONT, Color.white);
- button.addActionListener(listenerButton);
- buttonPanel.add(button);
- }
-
- musicButton = new MusicButton(AUDIO_ON, AUDIO_OFF, MUSIC_FILE); // Bouton pour contrôler la musique
- }
-
- /**
- * Ajoute les composants créés à la fenêtre parente.
- */
- public void addComponentsToWindow() {
- BorderLayout layout = new BorderLayout();
- window.getContentPane().setLayout(layout);
- window.add(titlePanel, BorderLayout.NORTH);
- window.add(buttonPanel, BorderLayout.WEST);
- window.add(imageLabel, BorderLayout.EAST);
- window.setPageTitle("Menu principal"); // Définit le titre de la page dans la fenêtre
-
- FlowLayout controlPanelLayout = new FlowLayout(FlowLayout.RIGHT);
- JPanel controlPanel = new JPanel(controlPanelLayout); // Panneau pour les contrôles audio
- controlPanel.setBackground(BACKGROUND_COLOR);
- controlPanel.add(musicButton); // Ajoute le bouton de contrôle audio
- window.add(controlPanel, BorderLayout.SOUTH); // Ajoute le panneau de contrôles à la fenêtre
-
- window.pack(); // Ajuste la taille de la fenêtre pour s'adapter à son contenu
- window.setVisible(true); // Rend la fenêtre visible
- }
-}
diff --git a/src/GSImport.java b/src/GSImport.java
index e6cc767..866a97d 100755
--- a/src/GSImport.java
+++ b/src/GSImport.java
@@ -9,10 +9,25 @@ import java.io.*;
* @author Marco ORFAO
*/
public class GSImport {
-
+
+ /**
+ * Fenêtre précédente
+ */
private Window previousFrame;
+
+ /**
+ * Indique si le fichier est accessible
+ */
private boolean accessible;
+
+ /**
+ * Fichier sélectionné pour l'importation
+ */
private File file;
+
+ /**
+ * Tableau des valeurs importées
+ */
private int[] importedValues = new int[9];
/**
@@ -69,14 +84,17 @@ public class GSImport {
}
}
-
+ /**
+ * Permet de savoir si le fichier est accessible
+ * @return le booleen accessible
+ */
public boolean isAccessible() {
return accessible;
}
/**
- * Gets the array of imported values.
- * @return the array of imported values
+ * Récupère le tableau des valeurs importées.
+ * @return le tableau des valeurs importées
*/
public int[] getImportedValues() {
return importedValues;
diff --git a/src/GSMenu.java b/src/GSMenu.java
index 6f5fe59..21bb59e 100755
--- a/src/GSMenu.java
+++ b/src/GSMenu.java
@@ -8,14 +8,40 @@ import java.awt.*;
* @author Marco ORFAO
*/
public class GSMenu {
+ /**
+ * Fenêtre dans laquelle le menu est affiché
+ */
+ private Window window;
- private Window window; // Fenêtre dans laquelle le menu est affiché
- private JPanel titlePanel; // Panneau pour le titre
- private JPanel buttonPanel; // Panneau pour les boutons
- private Title titleLabel; // Étiquette pour le titre
- private Button importerButton; // Bouton pour importer une grille
- private Button jouerButton; // Bouton pour commencer à jouer
- private Button autoSolveButton; // Bouton pour résoudre automatiquement la grille
+ /**
+ * Panneau pour le titre
+ */
+ private JPanel titlePanel;
+
+ /**
+ * Panneau pour les boutons
+ */
+ private JPanel buttonPanel;
+
+ /**
+ * Étiquette pour le titre
+ */
+ private Title titleLabel;
+
+ /**
+ * Bouton pour importer une grille
+ */
+ private Button importerButton;
+
+ /**
+ * Bouton pour commencer à jouer
+ */
+ private Button jouerButton;
+
+ /**
+ * Bouton pour résoudre automatiquement la grille
+ */
+ private Button autoSolveButton;
/**
* Constructeur de la classe GSMenu.
@@ -73,15 +99,26 @@ public class GSMenu {
this.autoSolveButton.setEnabled(true); // Active le bouton "Résolution automatique"
}
- // Méthodes getters pour les composants
+ /**
+ * Renvoie le bouton pour l'importation.
+ * @return Le bouton pour l'importation.
+ */
public Button getImporterButton() {
return this.importerButton;
}
+ /**
+ * Renvoie le bouton pour démarrer le jeu.
+ * @return Le bouton pour démarrer le jeu.
+ */
public Button getJouerButton() {
return this.jouerButton;
}
-
+
+ /**
+ * Renvoie le bouton pour résoudre automatiquement la grille.
+ * @return Le bouton pour résoudre automatiquement la grille.
+ */
public Button getAutoSolveButton() {
return this.autoSolveButton;
}
diff --git a/src/GSMenuController.java b/src/GSMenuController.java
index 79c69ab..fab07cb 100644
--- a/src/GSMenuController.java
+++ b/src/GSMenuController.java
@@ -8,9 +8,20 @@ import java.awt.event.ActionListener;
* @author Marco ORFAO
*/
public class GSMenuController implements ActionListener {
- private GSMenu gsMenu; // Menu Sudoku
- private Window mainWindow; // Fenêtre principale
- private GSGrid sudokuGrid; // Grille de Sudoku
+ /**
+ * Menu Sudoku
+ */
+ private GSMenu gsMenu;
+
+ /**
+ * Fenêtre principale
+ */
+ private Window mainWindow;
+
+ /**
+ * Grille de Sudoku
+ */
+ private GSGrid sudokuGrid;
/**
* Constructeur de la classe GSMenuController.
diff --git a/src/GSPlay.java b/src/GSPlay.java
index 2fc8582..f3d659a 100755
--- a/src/GSPlay.java
+++ b/src/GSPlay.java
@@ -9,26 +9,61 @@ import java.awt.event.*;
*/
public class GSPlay {
- // Valeur représentant une case vide
+ /**
+ * Valeur représentant une case vide
+ */
private static final int EMPTY_VALUE = 0;
- // Codes des touches numériques du pavé numérique
+ /**
+ * Codes des touches numériques du pavé numérique
+ */
private static final int[] NUM_KEYS = {KeyEvent.VK_NUMPAD1, KeyEvent.VK_NUMPAD2, KeyEvent.VK_NUMPAD3, KeyEvent.VK_NUMPAD4, KeyEvent.VK_NUMPAD5,
KeyEvent.VK_NUMPAD6, KeyEvent.VK_NUMPAD7, KeyEvent.VK_NUMPAD8, KeyEvent.VK_NUMPAD9};
- // Codes des touches numériques du clavier
+ /**
+ * Codes des touches numériques du clavier
+ */
private static final int[] KEY_NUMBERS = {KeyEvent.VK_1, KeyEvent.VK_2, KeyEvent.VK_3, KeyEvent.VK_4, KeyEvent.VK_5,
KeyEvent.VK_6, KeyEvent.VK_7, KeyEvent.VK_8, KeyEvent.VK_9};
- // Code de la touche de suppression
+ /**
+ * Code de la touche de suppression
+ */
private static final int DELETE_KEY = KeyEvent.VK_BACK_SPACE;
+ /**
+ * Container pour le contenu de la fenêtre
+ */
private Container content;
+
+ /**
+ * Grille de Sudoku
+ */
private GSGrid ma_Grille;
- private Button boutonValider = new Button("Valider",Color.lightGray);
+
+ /**
+ * Bouton "Valider" pour valider la grille
+ */
+ private Button boutonValider;
+
+ /**
+ * Temps de démarrage du jeu
+ */
private long startTime;
+
+ /**
+ * Temps écoulé depuis le démarrage du jeu
+ */
private long vraiTime;
+
+ /**
+ * Fenêtre de jeu
+ */
private Window gameplay;
+
+ /**
+ * Contrôleur pour gérer les événements de jeu
+ */
private GSPlayController gsPlayController;
/**
@@ -40,6 +75,7 @@ public class GSPlay {
this.ma_Grille = grille;
this.gameplay = window;
this.gsPlayController = new GSPlayController(this);
+ this.boutonValider = new Button("Valider",Color.lightGray);
}
/**
@@ -98,7 +134,7 @@ public class GSPlay {
}
/**
- * Méthode pour obtenir la grille
+ * Méthode pour obtenir la grille jouer
* @return la grille
*/
public GSGrid getMaGrille() {
diff --git a/src/GSPlayController.java b/src/GSPlayController.java
index de44857..73fa4a5 100644
--- a/src/GSPlayController.java
+++ b/src/GSPlayController.java
@@ -10,6 +10,9 @@ import java.awt.event.KeyListener;
* @author Marco ORFAO
*/
public class GSPlayController implements KeyListener, ActionListener {
+ /**
+ * Le jeu de la grille
+ */
private GSPlay gsPlay;
/**
@@ -56,6 +59,7 @@ public class GSPlayController implements KeyListener, ActionListener {
*/
@Override
public void keyReleased(KeyEvent e) {
+ // Non utilisé
}
/**
diff --git a/src/GSSolver.java b/src/GSSolver.java
index e74be62..ea6f5c9 100755
--- a/src/GSSolver.java
+++ b/src/GSSolver.java
@@ -8,11 +8,25 @@ import java.awt.*;
* @author Marco ORFAO
*/
public class GSSolver {
+ /**
+ * Grille de Sudoku à résoudre
+ */
+ private GSGrid grid;
- private GSGrid grid; // Grille de Sudoku à résoudre
- private Window window; // Fenêtre dans laquelle afficher la résolution
- private JLabel label = new JLabel("Resolution en cours..."); // Étiquette pour afficher le statut de la résolution
- private long startTime; // Temps de début de la résolution
+ /**
+ * Fenêtre dans laquelle afficher la résolution
+ */
+ private Window window;
+
+ /**
+ * Étiquette pour afficher le statut de la résolution
+ */
+ private JLabel label = new JLabel("Resolution en cours...");
+
+ /**
+ * Temps de début de la résolution
+ */
+ private long startTime;
/**
* Constructeur de la classe GSSolver.
diff --git a/src/GSTest.java b/src/GSTest.java
index d506064..1b8fbbb 100755
--- a/src/GSTest.java
+++ b/src/GSTest.java
@@ -5,8 +5,10 @@
* @author Marco ORFAO
*/
public class GSTest {
-
- private GSGrid ma_Grille;
+ /**
+ * La grille
+ */
+ private GSGrid ma_Grille;
/**
* Constructeur de la classe GSTest.
diff --git a/src/GSWin.java b/src/GSWin.java
index d1b207b..ebd4cac 100755
--- a/src/GSWin.java
+++ b/src/GSWin.java
@@ -1,12 +1,14 @@
/**
- * La classe GSWin gère l'affichage d'une fenêtre de félicitations pour avoir résolu le Sudoku.
+ * GSWin gère l'affichage d'une fenêtre de félicitations pour avoir résolu le Sudoku.
* @version 1.0
* @author Moncef STITI
* @author Marco ORFAO
*/
public class GSWin implements DialogManager {
-
- private long solvingTime; // Temps de résolution du Sudoku
+ /**
+ * Temps de résolution du Sudoku
+ */
+ private long solvingTime;
/**
* Constructeur de la classe GSWin.
diff --git a/src/GridMaker.java b/src/GridMaker.java
index f28266c..2c91938 100644
--- a/src/GridMaker.java
+++ b/src/GridMaker.java
@@ -1,6 +1,7 @@
public class GridMaker{
public static void main(String[] args) {
Window fenetre = new Window(); // Création d'une fenêtre
- GMHomeView menu = new GMHomeView(fenetre); // Création du menu sur la fenêtre
+ String[] gmButtonTexts = {"Générer une grille", "Règles", "Quitter"}; // Texte des boutons pour le menu du GridMaker
+ HomeView gmHomeView = new HomeView(fenetre, "Sudoku Grid Creator", "Par Moncef & Marco", gmButtonTexts);
}
}
\ No newline at end of file
diff --git a/src/GridSolver.java b/src/GridSolver.java
index e4935ad..14ddff5 100644
--- a/src/GridSolver.java
+++ b/src/GridSolver.java
@@ -1,6 +1,7 @@
public class GridSolver{
public static void main(String[] args) {
Window fenetre = new Window(); // Création d'une fenêtre
- GSHomeView menu = new GSHomeView(fenetre); // Création du menu sur la fenêtre
+ String[] gsButtonTexts = {"Jouer", "Règles", "Quitter"}; // Texte des boutons pour le menu du GridSolver
+ HomeView gsHomeView = new HomeView(fenetre, "Sudoku Game", "Par Moncef & Marco", gsButtonTexts);
}
}
\ No newline at end of file
diff --git a/src/HomeButtonClickListener.java b/src/HomeButtonClickListener.java
new file mode 100644
index 0000000..3916b5a
--- /dev/null
+++ b/src/HomeButtonClickListener.java
@@ -0,0 +1,53 @@
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+/**
+ * Listener pour les clics sur les boutons dans le menu.
+ * Il effectue différentes actions en fonction du bouton cliqué.
+ * @version 1.0
+ * @author Moncef STITI
+ * @author Marco ORFAO
+ */
+ public class HomeButtonClickListener implements ActionListener {
+ /**
+ * La fenêtre
+ */
+ private Window window;
+
+ /**
+ * Construit un ButtonClickListener avec la fenêtre spécifiée.
+ * @param window La fenêtre où les actions seront effectuées.
+ */
+ public HomeButtonClickListener(Window window) {
+ this.window = window;
+ }
+
+ /**
+ * Effectue une action en fonction du bouton cliqué.
+ * @param e L'ActionEvent représentant le clic sur le bouton.
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ String buttonText = ((Button) e.getSource()).getText();
+ switch (buttonText) {
+ case "Jouer":
+ Window.removeAllComponents(this.window);
+ GSMenu menuJeu = new GSMenu(this.window);
+ GSMenuController menuController = new GSMenuController(menuJeu, this.window);
+ break;
+ case "Générer une grille":
+ Window.removeAllComponents(this.window);
+ GMUserInterfaceView vueCreationGrille = new GMUserInterfaceView(this.window);
+ break;
+ case "Règles":
+ DialogManager rulesDialogManager = new RulesDialogManager();
+ rulesDialogManager.showDialog(); // Afficher les règles
+ break;
+ case "Quitter":
+ System.exit(0); // Quitter le programme
+ break;
+ default:
+ break;
+ }
+ }
+ }
\ No newline at end of file
diff --git a/src/GMHomeView.java b/src/HomeView.java
similarity index 72%
rename from src/GMHomeView.java
rename to src/HomeView.java
index 0981c72..ba831bd 100644
--- a/src/GMHomeView.java
+++ b/src/HomeView.java
@@ -1,5 +1,7 @@
import javax.swing.*;
import java.awt.*;
+import java.util.ArrayList;
+import java.util.List;
/**
* HomeView représente la vue de la page d'accueil de l'application Sudoku.
@@ -10,7 +12,7 @@ import java.awt.*;
* @author Moncef STITI
* @author Marco ORFAO
*/
-public class GMHomeView extends JPanel {
+public class HomeView extends JPanel {
// Constantes pour les chemins des icônes et des fichiers audio, ainsi que pour les dimensions et les couleurs
private final String AUDIO_ON = "img/iconeAudio.png";
@@ -22,27 +24,31 @@ public class GMHomeView extends JPanel {
private final Font TITLE_FONT = new Font("Copperplate", Font.BOLD, 75);
private final Font SUBTITLE_FONT = new Font("Copperplate", Font.PLAIN, 24);
private final Font BUTTON_FONT = new Font("Copperplate", Font.BOLD, 24);
- private final String[] BUTTON_TEXTS = {"Générer une grille", "Règles", "Quitter"};
-
- // Tableau de titres pour le titre principal et le sous-titre
- private final Title[] labels = {
- new Title("Sudoku Grid Creator", TITLE_FONT, TITLE_TEXT_COLOR),
- new Title("Par Moncef & Marco", SUBTITLE_FONT, TITLE_TEXT_COLOR)
- };
+ private final String[] BUTTON_TEXTS; // Textes des boutons
+ private final Title[] labels; // Tableau de titres pour le titre principal et le sous-titre
private MusicButton musicButton; // Bouton pour contrôler la musique
private final Window window; // Fenêtre parente
private JPanel titlePanel; // Panneau pour le titre
private JPanel buttonPanel; // Panneau pour les boutons
private JLabel imageLabel; // Étiquette pour l'image
+ private List buttonsList; // Liste des boutons créés
/**
* Constructeur de la classe HomeView.
* Initialise la fenêtre parente et crée les composants de la page d'accueil.
- * @param window La fenêtre parente.
+ *
+ * @param window La fenêtre parente.
+ * @param mainTitle Le titre principal de la page.
+ * @param subTitle Le sous-titre de la page.
+ * @param buttonTexts Les textes des boutons.
*/
- public GMHomeView(Window window) {
+ public HomeView(Window window, String mainTitle, String subTitle, String[] buttonTexts) {
this.window = window;
+ this.BUTTON_TEXTS = buttonTexts;
+ this.labels = new Title[]{new Title(mainTitle, TITLE_FONT, TITLE_TEXT_COLOR),
+ new Title(subTitle, SUBTITLE_FONT, TITLE_TEXT_COLOR)};
+ buttonsList = new ArrayList<>();
createComponents();
addComponentsToWindow();
}
@@ -70,11 +76,12 @@ public class GMHomeView extends JPanel {
buttonPanel.setLayout(buttonLayout);
buttonPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
buttonPanel.setBackground(BACKGROUND_COLOR);
- GMHomeButtonClickListener listenerButton = new GMHomeButtonClickListener(window);
+ HomeButtonClickListener listenerButton = new HomeButtonClickListener(window);
for (String text : BUTTON_TEXTS) {
Button button = new Button(text, BUTTON_SIZE, BUTTON_FONT, Color.white);
button.addActionListener(listenerButton);
buttonPanel.add(button);
+ buttonsList.add(button); // Ajout du bouton à la liste
}
musicButton = new MusicButton(AUDIO_ON, AUDIO_OFF, MUSIC_FILE); // Bouton pour contrôler la musique
@@ -100,4 +107,31 @@ public class GMHomeView extends JPanel {
window.pack(); // Ajuste la taille de la fenêtre pour s'adapter à son contenu
window.setVisible(true); // Rend la fenêtre visible
}
+
+ /**
+ * Récupère le premier bouton créé.
+ *
+ * @return Le premier bouton.
+ */
+ public Button getFirstButton() {
+ return buttonsList.get(0);
+ }
+
+ /**
+ * Récupère le deuxième bouton créé.
+ *
+ * @return Le deuxième bouton.
+ */
+ public Button getSecondButton() {
+ return buttonsList.get(1);
+ }
+
+ /**
+ * Récupère le troisième bouton créé.
+ *
+ * @return Le troisième bouton.
+ */
+ public Button getThirdButton() {
+ return buttonsList.get(2);
+ }
}
diff --git a/src/MusicButton.java b/src/MusicButton.java
index 485137d..389d35e 100644
--- a/src/MusicButton.java
+++ b/src/MusicButton.java
@@ -7,11 +7,27 @@ import javax.swing.*;
* @author Marco ORFAO
*/
public class MusicButton extends JButton {
- private static MusicPlayer currentMusicPlayer;
+/**
+ * Représente le lecteur de musique actuellement en cours de lecture.
+ */
+private static MusicPlayer currentMusicPlayer;
+
+ /**
+ * L'icône à afficher lorsque la musique est activée.
+ */
private ImageIcon iconOn;
+
+ /**
+ * L'icône à afficher lorsque la musique est désactivée.
+ */
private ImageIcon iconOff;
+
+ /**
+ * Le lecteur de musique associé à ce bouton.
+ */
private MusicPlayer musicPlayer;
+
/**
* Constructeur : Construit un MusicButton.
* @param onIconPath Le chemin du fichier d'icône lorsque la musique est activée.
@@ -32,7 +48,7 @@ public class MusicButton extends JButton {
this.musicPlayer = new MusicPlayer(musicFilePath);
- addActionListener(e -> {
+ this.addActionListener(e -> {
if (currentMusicPlayer != null && currentMusicPlayer.isPlaying()) {
currentMusicPlayer.stop();
currentMusicPlayer = null;
diff --git a/src/MusicPlayer.java b/src/MusicPlayer.java
index aea7765..0adab6e 100644
--- a/src/MusicPlayer.java
+++ b/src/MusicPlayer.java
@@ -9,7 +9,13 @@ import javax.sound.sampled.*;
*/
public class MusicPlayer {
+ /**
+ * Clip utilisé pour jouer la musique
+ */
private Clip clip;
+ /**
+ * Indique si la musique est en cours de lecture ou non
+ */
private boolean isPlaying;
/**
diff --git a/src/RulesSudoku.java b/src/RulesSudoku.java
index 606dc34..b315979 100644
--- a/src/RulesSudoku.java
+++ b/src/RulesSudoku.java
@@ -9,8 +9,14 @@ import java.awt.*;
* @author Marco ORFAO
*/
public class RulesSudoku extends JPanel {
- private Dimension FRAME_SIZE = new Dimension(400, 500); // Taille de la fenêtre des règles
- private Color BACKGROUND_COLOR = new Color(54, 91, 109); // Couleur d'arrière-plan du panneau
+ /**
+ * Taille de la fenêtre des règles
+ */
+ private Dimension FRAME_SIZE = new Dimension(400, 500);
+ /**
+ * Couleur d'arrière-plan du panneau
+ */
+ private Color BACKGROUND_COLOR = new Color(54, 91, 109);
/**
* Constructeur par défaut de RulesSudoku.
@@ -21,9 +27,7 @@ public class RulesSudoku extends JPanel {
this.setLayout(gestionnaireBorderLayout);
this.setBackground(this.BACKGROUND_COLOR); // Couleur d'arrière-plan du panneau
- JLabel titleLabel = new JLabel("Règles du Sudoku");
- titleLabel.setFont(new Font("Copperplate", Font.BOLD, 40)); // Police du titre
- titleLabel.setForeground(Color.WHITE); // Couleur du titre
+ Title titleLabel = new Title("Règles du Sudoku",new Font("Copperplate", Font.BOLD, 40),Color.WHITE);
JTextArea rulesTextArea = new JTextArea();
rulesTextArea.setText("Les règles du Sudoku :\n\n" +
diff --git a/src/Window.java b/src/Window.java
index 0cdf564..a6d2a4f 100644
--- a/src/Window.java
+++ b/src/Window.java
@@ -30,7 +30,7 @@ public class Window extends JFrame {
/**
* Constructeur de la classe Window.
- * Initialise la fenêtre avec le titre du programme, la taille minimale et la couleur de fond.
+ * Initialise la fenêtre avec la taille minimale et la couleur de fond.
*/
public Window() {
super(PROGRAM_TITLE);
@@ -40,14 +40,6 @@ public class Window extends JFrame {
getContentPane().setBackground(BACKGROUND_COLOR);
}
- /**
- * Obtient le titre de la page actuelle.
- * @return Le titre de la page actuelle.
- */
- public String getPageTitle() {
- return this.PAGE_TITLE;
- }
-
/**
* Définit le titre de la page actuelle.
* Met à jour le titre de la fenêtre pour inclure le titre de la page et le titre du programme.