GP-4818 - Theming - Added a combo box renderer to do combo box things

This commit is contained in:
dragonmacher 2024-08-05 15:21:06 -04:00
parent 1baf101d43
commit 5ef04e831c
22 changed files with 255 additions and 98 deletions

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -23,6 +23,7 @@ import java.awt.event.ItemListener;
import javax.swing.*;
import docking.widgets.list.GComboBoxCellRenderer;
import ghidra.features.base.codecompare.model.FunctionComparisonModel;
import ghidra.features.base.codecompare.model.FunctionComparisonModelListener;
import ghidra.features.base.codecompare.panel.CodeComparisonPanel;
@ -209,7 +210,7 @@ public class MultiFunctionComparisonPanel extends FunctionComparisonPanel
* Cell renderer for combo boxes that changes the default display to show
* both the function name and the program it comes from
*/
private class FunctionListCellRenderer extends DefaultListCellRenderer {
private class FunctionListCellRenderer extends GComboBoxCellRenderer<Object> {
@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index,