There is a small button in the upper right corner that pops up a selector for adjusting the horizon. I believe this is TimeGranularityTimelineControlPanel. In some cases, I would like to hide that button.
I know I can find it by name and setEnabled(false), which works, but also leaves me with no icon.
Is there a more elegant way to temporarily hide/remove that button?
Ideally you create your own instance of IComponentFactory (subclass DefaultComponentFactory) and override the createLayerContainerCorner() method. Inside this method always call super.createLayerContainerCorner(). When the corner is “UPPER_RIGHT” you can cast the returned component to NavigationControlPane and call the above method.
I’ll give that a shot now. I did look over the NavigationControlPanel code a bunch. But, I was focused on a call that would get me a singleton to use. I was afraid that creating another instance would cause problems with the UI rendering or listeners.