-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alex
committed
Mar 7, 2022
1 parent
1d675e0
commit 6f2223e
Showing
5 changed files
with
309 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package panels; | ||
|
||
import controls.Label; | ||
import io.github.humbleui.jwm.*; | ||
import io.github.humbleui.skija.Canvas; | ||
import misc.CoordinateSystem2i; | ||
|
||
import static app.Application.PANEL_PADDING; | ||
import static app.Colors.PANEL_BACKGROUND_COLOR; | ||
|
||
/** | ||
* Панель управления | ||
*/ | ||
public class PanelControl extends GridPanel { | ||
/** | ||
* Заголовок | ||
*/ | ||
private final Label label; | ||
|
||
/** | ||
* Панель управления | ||
* | ||
* @param window окно | ||
* @param drawBG флаг, нужно ли рисовать подложку | ||
* @param color цвет подложки | ||
* @param padding отступы | ||
* @param gridWidth кол-во ячеек сетки по ширине | ||
* @param gridHeight кол-во ячеек сетки по высоте | ||
* @param gridX координата в сетке x | ||
* @param gridY координата в сетке y | ||
* @param colspan кол-во колонок, занимаемых панелью | ||
* @param rowspan кол-во строк, занимаемых панелью | ||
*/ | ||
public PanelControl( | ||
Window window, boolean drawBG, int color, int padding, int gridWidth, int gridHeight, | ||
int gridX, int gridY, int colspan, int rowspan | ||
) { | ||
super(window, drawBG, color, padding, gridWidth, gridHeight, gridX, gridY, colspan, rowspan); | ||
|
||
// создаём первый заголовок | ||
label = new Label(window, false, PANEL_BACKGROUND_COLOR, PANEL_PADDING, | ||
1, 1, 0, 0, 1, 1, "Панель управления", true, true); | ||
|
||
} | ||
|
||
/** | ||
* Обработчик событий | ||
* | ||
* @param e событие | ||
*/ | ||
@Override | ||
public void accept(Event e) { | ||
|
||
} | ||
|
||
/** | ||
* Метод под рисование в конкретной реализации | ||
* | ||
* @param canvas область рисования | ||
* @param windowCS СК окна | ||
*/ | ||
@Override | ||
public void paintImpl(Canvas canvas, CoordinateSystem2i windowCS) { | ||
label.paint(canvas, windowCS); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package panels; | ||
|
||
import controls.Label; | ||
import io.github.humbleui.jwm.Event; | ||
import io.github.humbleui.jwm.Window; | ||
import io.github.humbleui.skija.Canvas; | ||
import misc.CoordinateSystem2i; | ||
|
||
import static app.Application.PANEL_PADDING; | ||
import static app.Colors.PANEL_BACKGROUND_COLOR; | ||
|
||
/** | ||
* Панель поддержки | ||
*/ | ||
public class PanelHelp extends GridPanel { | ||
/** | ||
* Заголовок | ||
*/ | ||
private final Label label; | ||
|
||
/** | ||
* Панель управления | ||
* | ||
* @param window окно | ||
* @param drawBG флаг, нужно ли рисовать подложку | ||
* @param color цвет подложки | ||
* @param padding отступы | ||
* @param gridWidth кол-во ячеек сетки по ширине | ||
* @param gridHeight кол-во ячеек сетки по высоте | ||
* @param gridX координата в сетке x | ||
* @param gridY координата в сетке y | ||
* @param colspan кол-во колонок, занимаемых панелью | ||
* @param rowspan кол-во строк, занимаемых панелью | ||
*/ | ||
public PanelHelp( | ||
Window window, boolean drawBG, int color, int padding, int gridWidth, int gridHeight, | ||
int gridX, int gridY, int colspan, int rowspan | ||
) { | ||
super(window, drawBG, color, padding, gridWidth, gridHeight, gridX, gridY, colspan, rowspan); | ||
|
||
// создаём первый заголовок | ||
label = new Label(window, false, PANEL_BACKGROUND_COLOR, PANEL_PADDING, | ||
1, 1, 0, 0, 1, 1, "Панель помощи", true, true); | ||
|
||
} | ||
|
||
/** | ||
* Обработчик событий | ||
* | ||
* @param e событие | ||
*/ | ||
@Override | ||
public void accept(Event e) { | ||
|
||
} | ||
|
||
/** | ||
* Метод под рисование в конкретной реализации | ||
* | ||
* @param canvas область рисования | ||
* @param windowCS СК окна | ||
*/ | ||
@Override | ||
public void paintImpl(Canvas canvas, CoordinateSystem2i windowCS) { | ||
label.paint(canvas, windowCS); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package panels; | ||
|
||
import controls.Label; | ||
import io.github.humbleui.jwm.Event; | ||
import io.github.humbleui.jwm.Window; | ||
import io.github.humbleui.skija.Canvas; | ||
import misc.CoordinateSystem2i; | ||
|
||
import static app.Application.PANEL_PADDING; | ||
import static app.Colors.PANEL_BACKGROUND_COLOR; | ||
|
||
/** | ||
* Панель управления | ||
*/ | ||
public class PanelLog extends GridPanel { | ||
/** | ||
* Заголовок | ||
*/ | ||
private final Label label; | ||
|
||
/** | ||
* Панель управления | ||
* | ||
* @param window окно | ||
* @param drawBG флаг, нужно ли рисовать подложку | ||
* @param color цвет подложки | ||
* @param padding отступы | ||
* @param gridWidth кол-во ячеек сетки по ширине | ||
* @param gridHeight кол-во ячеек сетки по высоте | ||
* @param gridX координата в сетке x | ||
* @param gridY координата в сетке y | ||
* @param colspan кол-во колонок, занимаемых панелью | ||
* @param rowspan кол-во строк, занимаемых панелью | ||
*/ | ||
public PanelLog( | ||
Window window, boolean drawBG, int color, int padding, int gridWidth, int gridHeight, | ||
int gridX, int gridY, int colspan, int rowspan | ||
) { | ||
super(window, drawBG, color, padding, gridWidth, gridHeight, gridX, gridY, colspan, rowspan); | ||
|
||
|
||
// создаём первый заголовок | ||
label = new Label(window, false, PANEL_BACKGROUND_COLOR, PANEL_PADDING, | ||
1, 1, 0, 0, 1, 1, "Панель лога", true, true); | ||
|
||
} | ||
|
||
/** | ||
* Обработчик событий | ||
* | ||
* @param e событие | ||
*/ | ||
@Override | ||
public void accept(Event e) { | ||
|
||
} | ||
|
||
/** | ||
* Метод под рисование в конкретной реализации | ||
* | ||
* @param canvas область рисования | ||
* @param windowCS СК окна | ||
*/ | ||
@Override | ||
public void paintImpl(Canvas canvas, CoordinateSystem2i windowCS) { | ||
label.paint(canvas, windowCS); | ||
} | ||
} |
Oops, something went wrong.