Examples of JCustomPanel


Examples of client.custom.JCustomPanel

   * Instantiates variables and enforces properties in connection with the main containers of the frame.
   */
  private void buildConfigureMainContainers(Dice curGameDice){
   
    //Create the contentpane JPanel(bgPanel) of the frame, the root container for all following elements
    bgPanel = new JCustomPanel(new BorderLayout(), Constants.MAIN_BACKGROUND_IMAGE_PATH);
    bgPanel.setBorder(BorderFactory.createMatteBorder(1,1,1,1,Color.BLACK));
    setContentPane(bgPanel);
    //Create a panel for animation behaviour (drawingPanel) to display dice rolls etc.
    drawingPanel = new DrawingPanel(curGameDice);
    drawingPanel.addMouseListener(new ClickDiceListener());
View Full Code Here

Examples of client.custom.JCustomPanel

   
    rollerNameInd = new JLabel("Metsamees123");
    rollerNameInd.setFont(Constants.tahoma_mediumsmall_bold);
    rollerNameInd.setForeground(Color.RED);
   
    turnMenuPanel = new JCustomPanel(new FlowLayout(FlowLayout.LEFT), Constants.REGULAR_TILE_IMAGE_PATH);
    turnMenuPanel.setPreferredSize(new Dimension(120, 78));
    turnMenuPanel.setBorder(BorderFactory.createMatteBorder(0, 1, 1, 0, Color.BLACK));
    turnMenuPanel.setOpaque(false);
   
    turnMenuPanel.add(txt_loggedIn);
View Full Code Here

Examples of client.custom.JCustomPanel

   
    leaveGameBtn = new JButton("Leave game");
    leaveGameBtn.setPreferredSize(new Dimension(110, 22));
    leaveGameBtn.addActionListener(new LeaveButtonListener(client));
   
    generalButtonPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 2, 3), Constants.REGULAR_TILE_IMAGE_PATH);
    generalButtonPanel.setPreferredSize(new Dimension(120,190));
    generalButtonPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, Color.BLACK));
    generalButtonPanel.setOpaque(false);
   
    generalButtonPanel.add(newGameBtn);
    generalButtonPanel.add(instructionsBtn);
    generalButtonPanel.add(leaveGameBtn);
   
    txt_generalMenu = new JLabel("General menu");
    txt_generalMenu.setFont(Constants.tahoma_medium_bold);
    txt_generalMenu.setForeground(Color.WHITE);
   
    generalButtonHeadingPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 2, 2), Constants.REGULAR_TILE_IMAGE_PATH);
    generalButtonHeadingPanel.setPreferredSize(new Dimension(120,18));
    generalButtonHeadingPanel.setOpaque(false);
    generalButtonHeadingPanel.add(txt_generalMenu);
  }
View Full Code Here

Examples of client.custom.JCustomPanel

    leaderAreaPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    leaderAreaPane.getVerticalScrollBar().addAdjustmentListener(new LeaderboardScrollListener());
    leaderAreaPane.setOpaque(false);
    leaderAreaPane.getViewport().setOpaque(false);
   
    leaderAreaPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER,1,1), Constants.REGULAR_TILE_IMAGE_PATH);
    leaderAreaPanel.setPreferredSize(new Dimension(new Dimension(LEADER_AREA_WIDTH, LEADER_AREA_HEIGHT - 6)));
    leaderAreaPanel.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 0, Color.BLACK));
    leaderAreaPanel.setOpaque(false);
   
    leaderAreaPanel.add(txt_leaderArea);
View Full Code Here

Examples of client.custom.JCustomPanel

    txt_playMenu = new JLabel("Play options");
    txt_playMenu.setFont(Constants.tahoma_medium_bold);
    txt_playMenu.setForeground(Color.WHITE);
   
    playHeadingPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 1, 2), Constants.REGULAR_TILE_IMAGE_PATH);
    playHeadingPanel.setPreferredSize(new Dimension(119,18));
    playHeadingPanel.setOpaque(false);
    playHeadingPanel.add(txt_playMenu);

    rollDiceBtn = new JButton("Roll");
    rollDiceBtn.setPreferredSize(new Dimension(110,22));
    rollDiceBtn.addActionListener(new RollActionListener());
   
    txt_rollsLeft = new JLabel("Rolls left:  ");
    txt_rollsLeft.setBorder(new EmptyBorder(4,0,0,0));
    txt_rollsLeft.setFont(Constants.tahoma_mediumsmall_bold);
    txt_rollsLeft.setForeground(Color.WHITE);
   
    rollsLeftInd = new JLabel("2");
    rollsLeftInd.setBorder(new EmptyBorder(4,0,0,0));
    rollsLeftInd.setFont(Constants.tahoma_mediumsmall_bold);
    rollsLeftInd.setForeground(Color.RED)
       
    rollPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 1, 2), Constants.REGULAR_TILE_IMAGE_PATH);
    rollPanel.setPreferredSize(new Dimension(119, 45));
    rollPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.BLACK));
    rollPanel.setOpaque(false)
   
    rollPanel.add(rollDiceBtn);
    rollPanel.add(txt_rollsLeft);
    rollPanel.add(rollsLeftInd);
   
    txt_turnTimeLeft = new JLabel("Turn time left:");
    txt_turnTimeLeft.setFont(Constants.tahoma_mediumsmall_bold);
    txt_turnTimeLeft.setForeground(Color.WHITE);
 
    turnTimerText = new JLabelSubscriber("03:00");
    turnTimerText.setFont(Constants.tahoma_mediumsmall_bold);
    turnTimerText.setForeground(Color.RED)
    client.setTurnTimer(new ActTimeCountdown(Client.TURN_TIME_MILLIS, Client.TIMEUNIT_MILLIS, client));
    client.getTurnTimer().addSubscriber(turnTimerText);

    turnTimePanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 10, 2), Constants.REGULAR_TILE_IMAGE_PATH);
    turnTimePanel.setPreferredSize(new Dimension(119, 33));
    turnTimePanel.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, Color.BLACK));
    turnTimePanel.setOpaque(false);
   
    turnTimePanel.add(txt_turnTimeLeft);
    turnTimePanel.add(turnTimerText);
       
    skipTurnBtn = new JButton("Skip turn");
    skipTurnBtn.setPreferredSize(new Dimension(110, 22));
    skipTurnBtn.addActionListener(new SkipListener());

    skipPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 2, 2), Constants.REGULAR_TILE_IMAGE_PATH);
    skipPanel.setPreferredSize(new Dimension(119, 27));
    skipPanel.setOpaque(false);
    skipPanel.add(skipTurnBtn);
  }
View Full Code Here

Examples of client.custom.JCustomPanel

             
        upperIntEasternPanel.add(containerPane);   
       
      intEasternPanel.add(upperIntEasternPanel);
   
        JPanel lowerIntEasternPanel = new JCustomPanel(new FlowLayout(FlowLayout.CENTER, 2, 2), Constants.REGULAR_TILE_IMAGE_PATH);
        lowerIntEasternPanel.setPreferredSize(new Dimension(INFO_AREA_WIDTH, INFO_AREA_HEIGHT+3));
        lowerIntEasternPanel.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, Color.BLACK));
        lowerIntEasternPanel.setOpaque(false)
         
        lowerIntEasternPanel.add(logAreaPane);
        lowerIntEasternPanel.add(sayField);
        lowerIntEasternPanel.add(btnSayText);
       
      intEasternPanel.add(lowerIntEasternPanel);
       
    c.fill = GridBagConstraints.VERTICAL;
    c.gridx = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.