Panel that expands and gives a brief overview of a library when clicked.
| 52 | * Panel that expands and gives a brief overview of a library when clicked. |
| 53 | */ |
| 54 | class DetailPanel extends JPanel { |
| 55 | static public final String REMOVE_RESTART_MESSAGE = |
| 56 | String.format("<i>%s</i>", Language.text("contrib.messages.remove_restart")); |
| 57 | |
| 58 | static public final String INSTALL_RESTART_MESSAGE = |
| 59 | String.format("<i>%s</i>", Language.text("contrib.messages.install_restart")); |
| 60 | |
| 61 | static public final String UPDATE_RESTART_MESSAGE = |
| 62 | String.format("<i>%s</i>", Language.text("contrib.messages.update_restart")); |
| 63 | |
| 64 | static public final String PROGRESS_BAR_CONSTRAINT = "Install/Remove Progress Bar Panel"; |
| 65 | |
| 66 | static public final String BUTTON_CONSTRAINT = "Install/Remove Button Panel"; |
| 67 | |
| 68 | static public final String INCOMPATIBILITY_BLUR = "This contribution is not compatible with " |
| 69 | + "the current revision of Processing"; |
| 70 | |
| 71 | private final ListPanel listPanel; |
| 72 | private final ContributionListing contribListing = ContributionListing.getInstance(); |
| 73 | |
| 74 | static final int BUTTON_WIDTH = Toolkit.zoom(100); |
| 75 | static Icon foundationIcon; |
| 76 | |
| 77 | /** |
| 78 | * Should only be set through setContribution(), |
| 79 | * otherwise UI components will not be updated. |
| 80 | */ |
| 81 | private Contribution contrib; |
| 82 | |
| 83 | public Contribution getContrib() { |
| 84 | return contrib; |
| 85 | } |
| 86 | |
| 87 | private LocalContribution getLocalContrib() { |
| 88 | return (LocalContribution) contrib; |
| 89 | } |
| 90 | |
| 91 | private boolean alreadySelected; |
| 92 | private boolean enableHyperlinks; |
| 93 | //private HyperlinkListener conditionalHyperlinkOpener; |
| 94 | private JTextPane descriptionPane; |
| 95 | private JLabel notificationLabel; |
| 96 | private JButton updateButton; |
| 97 | JProgressBar installProgressBar; |
| 98 | private JButton installRemoveButton; |
| 99 | private JPopupMenu contextMenu; |
| 100 | private JMenuItem openFolder; |
| 101 | |
| 102 | private JPanel barButtonCardPane; |
| 103 | private CardLayout barButtonCardLayout; |
| 104 | |
| 105 | static private final String installText = Language.text("contrib.install"); |
| 106 | static private final String removeText = Language.text("contrib.remove"); |
| 107 | static private final String undoText = Language.text("contrib.undo"); |
| 108 | |
| 109 | boolean updateInProgress; |
| 110 | boolean installInProgress; |
| 111 | boolean removeInProgress; |
nothing calls this directly
no test coverage detected