Skip to content

Commit

Permalink
New screenshots, minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jytou committed Apr 30, 2018
1 parent 3c2b59f commit a289814
Show file tree
Hide file tree
Showing 21 changed files with 60 additions and 12 deletions.
Binary file modified captures/defaut.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified captures/ecranprincipal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified captures/fin_ml.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/kbshortcuts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified captures/krita/ecranprincipal.kra
Binary file not shown.
Binary file modified captures/krita/morts_sugg.kra
Binary file not shown.
Binary file modified captures/krita/nouveau_credit.kra
Binary file not shown.
Binary file added captures/krita/nvellepartie.kra
Binary file not shown.
Binary file modified captures/krita/rembours_credit.kra
Binary file not shown.
Binary file modified captures/morts_sugg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified captures/nouveau_credit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified captures/nvellepartie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified captures/rembours_credit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed captures/statmm.jpg
Binary file not shown.
Binary file added captures/statmmd.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captures/statmml.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions jyt.geconomicus.helper/gecoJPA.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[EL Info]: 2018-04-30 13:02:47.363--ServerSession(825791803)--EclipseLink, version: Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f
[EL Info]: connection: 2018-04-30 13:02:47.829--ServerSession(825791803)--/file:/home/jytou/git/geconomicus_helper/jyt.geconomicus.helper/bin/_geco login successful
[EL Warning]: 2018-04-30 13:02:48.428--ServerSession(825791803)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: La contrainte "FK_PLAYER_GAME_ID" existe déjà
Constraint "FK_PLAYER_GAME_ID" already exists; SQL statement:
ALTER TABLE PLAYER ADD CONSTRAINT FK_PLAYER_GAME_ID FOREIGN KEY (GAME_ID) REFERENCES GAME (ID) [90045-197]
Error Code: 90045
Call: ALTER TABLE PLAYER ADD CONSTRAINT FK_PLAYER_GAME_ID FOREIGN KEY (GAME_ID) REFERENCES GAME (ID)
Query: DataModifyQuery(sql="ALTER TABLE PLAYER ADD CONSTRAINT FK_PLAYER_GAME_ID FOREIGN KEY (GAME_ID) REFERENCES GAME (ID)")
[EL Warning]: 2018-04-30 13:02:48.438--ServerSession(825791803)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: La contrainte "FK_EVENT_PLAYER_ID" existe déjà
Constraint "FK_EVENT_PLAYER_ID" already exists; SQL statement:
ALTER TABLE EVENT ADD CONSTRAINT FK_EVENT_PLAYER_ID FOREIGN KEY (PLAYER_ID) REFERENCES PLAYER (ID) [90045-197]
Error Code: 90045
Call: ALTER TABLE EVENT ADD CONSTRAINT FK_EVENT_PLAYER_ID FOREIGN KEY (PLAYER_ID) REFERENCES PLAYER (ID)
Query: DataModifyQuery(sql="ALTER TABLE EVENT ADD CONSTRAINT FK_EVENT_PLAYER_ID FOREIGN KEY (PLAYER_ID) REFERENCES PLAYER (ID)")
[EL Info]: connection: 2018-04-30 13:02:56.692--ServerSession(825791803)--/file:/home/jytou/git/geconomicus_helper/jyt.geconomicus.helper/bin/_geco logout successful
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ General.Credit.Principal=Principal
HelperUI.Action.Command.BankInvestsMoneyAndCards=b:Bank invests cards/money
HelperUI.Action.Command.PlayerTakesNewCredit=c:new Credit for player
HelperUI.Action.Command.PlayerDefaultsOnDebts=d:Default on debts
HelperUI.Action.Command.PlayerFinalAssessment=f:Final assessment of bank
HelperUI.Action.Command.BankFinalAssessment=f:Final assessment of bank
HelperUI.Action.Command.PlayerPaysInterestOnly=i:Interest paid back only
HelperUI.Action.Command.UnexpectedMoneyMassChange=m:unexpected Money mass change
HelperUI.Action.Command.NewPlayer=p:New player
Expand Down Expand Up @@ -196,6 +196,7 @@ HelperUI.Player.Table.History.DeathRebirth=D
HelperUI.Player.Table.History.Default=F
HelperUI.Player.Table.History.Prison=P
HelperUI.Player.Table.History.Reimbursement=R
HelperUI.Player.Table.Tooltip.SuggestedDeath=It is suggested that this player experience death/rebirth this turn
HelperUI.PlayerTable.Tooltip.InactivePlayer=Inactive Player
HelperUI.PlayerTable.Tooltip.PlayerInPrison=Player in Prison
HelperUI.PlayerTable.Tooltip.PlayerMustVisitBank=Player Must Visit Bank
Expand Down
42 changes: 33 additions & 9 deletions jyt.geconomicus.helper/ui/jyt/geconomicus/helper/HelperUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,26 +445,27 @@ public Component getTableCellRendererComponent(JTable pTable, Object pValue, boo
Color color = Color.black;
setToolTipText(""); //$NON-NLS-1$
setText(""); //$NON-NLS-1$
String tooltip = ""; //$NON-NLS-1$
switch (value)
{
case PLAYER_INACTIVE:
setToolTipText(UIMessages.getString("HelperUI.PlayerTable.Tooltip.InactivePlayer")); //$NON-NLS-1$
tooltip = UIMessages.getString("HelperUI.PlayerTable.Tooltip.InactivePlayer"); //$NON-NLS-1$
color = Color.gray;
break;
case PLAYER_NEEDS_BANK:
setToolTipText(UIMessages.getString("HelperUI.PlayerTable.Tooltip.PlayerMustVisitBank")); //$NON-NLS-1$
tooltip = UIMessages.getString("HelperUI.PlayerTable.Tooltip.PlayerMustVisitBank"); //$NON-NLS-1$
color = Color.red;
break;
case PLAYER_IN_WARNING:
setToolTipText(mPlayersInWarning.get(mPlayers.get(pRow).getId()));
tooltip = mPlayersInWarning.get(mPlayers.get(pRow).getId());
color = Color.orange;
break;
case PLAYER_IN_PRISON:
setToolTipText(UIMessages.getString("HelperUI.PlayerTable.Tooltip.PlayerInPrison")); //$NON-NLS-1$
tooltip = UIMessages.getString("HelperUI.PlayerTable.Tooltip.PlayerInPrison"); //$NON-NLS-1$
color = Color.lightGray;
break;
case PLAYER_OK:
setToolTipText(UIMessages.getString("HelperUI.PlayerTable.Tooltip.PlayerOk")); //$NON-NLS-1$
tooltip = UIMessages.getString("HelperUI.PlayerTable.Tooltip.PlayerOk"); //$NON-NLS-1$
color = Color.green;
break;

Expand All @@ -473,6 +474,15 @@ public Component getTableCellRendererComponent(JTable pTable, Object pValue, boo
}
setBackground(color);
mDeathCandidate = mSuggestedDeathsLabel.getText().contains(mPlayers.get(pRow).getName());
if (mDeathCandidate)
{
tooltip = "<html>" + tooltip; //$NON-NLS-1$
if (tooltip.length() > 0)
tooltip += "<br>"; //$NON-NLS-1$
tooltip += UIMessages.getString("HelperUI.Player.Table.Tooltip.SuggestedDeath"); //$NON-NLS-1$
tooltip = tooltip + "</html>"; //$NON-NLS-1$
}
setToolTipText(tooltip);
return this;
}

Expand Down Expand Up @@ -1174,6 +1184,7 @@ public void windowClosing(WindowEvent pEvent)
setGame(pGame);

setVisible(true);
mPlayerTable.requestFocusInWindow();
}

private void createMenuAndToolbar(final JPanel pMainPanel, final int pMoneySystem)
Expand Down Expand Up @@ -1223,7 +1234,14 @@ public void actionPerformed(ActionEvent pEvent)
{
if (mValuesHelper == null)
{
mValuesHelper = new ValuesHelper(HelperUI.this, mGame.getMoneySystem());
try
{
mValuesHelper = new ValuesHelper(HelperUI.this, mGame.getMoneySystem());
}
catch (IOException e)
{
UIUtil.showExceptionMessage(HelperUI.this, e);
}
for (Event event : mEvents)
if (EventType.TURN.equals(event.getEvt()))
mValuesHelper.rotateValues();
Expand All @@ -1245,7 +1263,14 @@ public void actionPerformed(ActionEvent pEvent)
{
if (mKBShortcutsHelper == null)
{
mKBShortcutsHelper = new KeyboardShortcutsHelper(HelperUI.this, mGame.getMoneySystem());
try
{
mKBShortcutsHelper = new KeyboardShortcutsHelper(HelperUI.this, mGame.getMoneySystem());
}
catch (IOException e)
{
UIUtil.showExceptionMessage(HelperUI.this, e);
}
mKBShortcutsHelper.setVisible(true);
}
}
Expand Down Expand Up @@ -1338,7 +1363,6 @@ public JPanel buildPlayerListPane(int pMoneySystem)
final JPanel playerListPane = new JPanel(new GridBagLayout());
mPlayerTableModel = new PlayerTableModel(pMoneySystem);
mPlayerTable = new JTable(mPlayerTableModel);
mPlayerTable.requestFocusInWindow();
mPlayerTable.setDefaultRenderer(Integer.class, new PlayerColorRenderer());
mPlayerTable.setDefaultRenderer(String.class, new PlayerColorRenderer());
final TableColumnModel columnModel = mPlayerTable.getColumnModel();
Expand Down Expand Up @@ -1483,7 +1507,7 @@ private void fillStatusPanel()
if (mGame.getMoneySystem() == Game.MONEY_DEBT)
{
mMoneyMassLabel.setText(String.valueOf(mGame.getMoneyMass()) + " ");//$NON-NLS-1$
mMoneyPerPlayerLabel.setText(new DecimalFormat(".###").format(mPlayers.size() > 0 ? 1.0 * mGame.getMoneyMass() / mPlayers.size() : 0.0) + " ");//$NON-NLS-1$//$NON-NLS-2$
mMoneyPerPlayerLabel.setText(new DecimalFormat("#.###").format(mPlayers.size() > 0 ? 1.0 * mGame.getMoneyMass() / mPlayers.size() : 0.0) + " ");//$NON-NLS-1$//$NON-NLS-2$
mGainedInterestLabel.setText(String.valueOf(mGame.getInterestGained()) + " ");//$NON-NLS-1$
mSeizedValuesLabel.setText(String.valueOf(mGame.getSeizedValues()) + " ");//$NON-NLS-1$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.util.SortedMap;
import java.util.TreeMap;

import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
Expand All @@ -18,9 +20,10 @@ public class KeyboardShortcutsHelper extends JFrame
private static final int DEFAULT_HEIGHT = 200;
private HelperUI mHelperUI;

public KeyboardShortcutsHelper(HelperUI pHelperUI, int pMoneySystem)
public KeyboardShortcutsHelper(HelperUI pHelperUI, int pMoneySystem) throws IOException
{
super(UIMessages.getString("KeyboardShortcutsHelper.Main.Title")); //$NON-NLS-1$
setIconImage(ImageIO.read(HelperUI.class.getResourceAsStream("/geconomicus.png"))); //$NON-NLS-1$
mHelperUI = pHelperUI;
addWindowListener(new WindowAdapter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
import java.awt.geom.Line2D;
import java.awt.geom.Path2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.text.MessageFormat;

import javax.imageio.ImageIO;
import javax.swing.JColorChooser;
import javax.swing.JFrame;
import javax.swing.JPanel;
Expand Down Expand Up @@ -236,7 +238,7 @@ else if (pLocY == 1)
}
}

public ValuesHelper(HelperUI pHelperUI, int pMoneySystem)
public ValuesHelper(HelperUI pHelperUI, int pMoneySystem) throws IOException
{
super(UIMessages.getString("Frame.ValuesHelper.Frame.Title")); //$NON-NLS-1$
mHelperUI = pHelperUI;
Expand All @@ -249,6 +251,7 @@ public void windowClosing(WindowEvent pEvent)
mHelperUI.closedValueHelper();
}
});
setIconImage(ImageIO.read(HelperUI.class.getResourceAsStream("/geconomicus.png"))); //$NON-NLS-1$
setSize(Toolkit.getDefaultToolkit().getScreenSize());
MoneyHelperPanel moneyHelperPanel = new MoneyHelperPanel();
getContentPane().setLayout(new BorderLayout());
Expand Down

0 comments on commit a289814

Please sign in to comment.