コード例 #1
0
 @Override
 void Return() {
   Adam.remove(called.Eve);
   Adam.add(Eve);
   Adam.revalidate();
   Adam.setMinimumSize(windowSize);
   Adam.repaint();
 }
コード例 #2
0
 @Override
 void Switch() {
   Adam.remove(caller.Eve);
   Adam.add(Eve);
   Adam.revalidate();
   Adam.setMinimumSize(windowSize);
   Adam.repaint();
 }
コード例 #3
0
    void drawScreen() {

      teams.add(myTeams);
      teams.add(manageTeams, "growx");
      teams.add(new JSeparator(), "growx");

      for (Team team : Global.Teams) {
        JPanel thisTeam = team.teamPreview();
        JButton startTeam = new JButton("Draft!");
        startTeam.addActionListener(
            (ActionEvent e) -> {
              DraftScreen called = new DraftScreen(team, this);
              called.Switch();
            });
        thisTeam.add(startTeam, "east");
        thisTeam.setBorder(BorderFactory.createLineBorder(Color.black));
        teamsInner.add(thisTeam, "growx");
      }
      teams.add(teamScroll);

      players.add(myPlayers);
      players.add(managePlayers, "growx");
      players.add(new JSeparator());

      for (Player player : Global.Players) {
        JPanel thisPlayer = player.playerPreview();
        JButton modify = new JButton(ResourceRetriever.getImage("edit.png", 16, 16));
        modify.setMargin(new Insets(0, 0, 0, 0));
        modify.addActionListener(
            (ActionEvent e) -> {
              new ModifyPlayerPopup(player, this, null);
            });
        thisPlayer.add(modify, "east");
        thisPlayer.setBorder(BorderFactory.createLineBorder(Color.black));
        playersInner.add(thisPlayer, "growx");
      }
      players.add(playerScroll);

      teamDraft.add(teamDraftL, "span, center");
      teamDraft.add(teams, "grow");
      teamDraft.add(players, "grow");

      Eve.add(quick);
      Eve.add(viewAll);
      Eve.add(teamDraft, "span");

      Adam.add(Eve);
      Adam.setSize(windowSize);
    }