T
Todd
Hello,
I have a set of classes that I am in the process of making generic. I
don't know how much detail to put into this message, so please ask if
you need more information.
I have two classes at the same level: Trajectory (generic) and
ParkTrajectory. Trajectory takes a ValueType generic argument, i.e.,
public class Trajectory<ValueType> ...
Trajectory has an inner class called TrajectoryJTabbedPane with a
method setInitializationJPanel which takes an InitializationJPanel
argument. The InitializationJPanel class is inner to
TrajectoryJTabbedPane.
public class Trajectory<ValueType>
{
public class TrajectoryJTabbedPane
{
public void setInitializaionJPanel( final InitializationJPanel
ijp )
{
this.ijp = ijp;
}
public class InitializationJPanel{}
}
}
My ParkTrajectory class extends the Trajectory class and worked well
prior to my attempts at making Trajectory generic.
public class ParkTrajectory extends Trajectory<double[]>
{
public class ParkOrbitJTabbedPane extends TrajectoryJTabbedPane
{
protected ParkOrbitJTabbedPane()
{
setInitializationJPanel( new
ParkOrbitVehicleConfigurationJPanel() ); // <-----
}
private final ParkOrbitVehicleConfigurationJPanel extends
InitializationJPanel{}
}
}
Now, the call to setInitializationJPanel within the
ParkOrbitJTabbedPane constructor results in the following error:
setInitializationJPanel(Trajectory<double[]>.InitializationJPanel) in
Trajectory<double[]>.TrajectoryJTabbedPane cannot be applied to
(ParkTrajectory.PparkOrbitJTabbedPane.ParkOrbitVehicleConfigurationJPanel)
Why is this so? The inheritance from InitializationJPanel has not
changed (at least directly). How do I get the method to work with the
generic model?
Any help is appreciated,
Todd
I have a set of classes that I am in the process of making generic. I
don't know how much detail to put into this message, so please ask if
you need more information.
I have two classes at the same level: Trajectory (generic) and
ParkTrajectory. Trajectory takes a ValueType generic argument, i.e.,
public class Trajectory<ValueType> ...
Trajectory has an inner class called TrajectoryJTabbedPane with a
method setInitializationJPanel which takes an InitializationJPanel
argument. The InitializationJPanel class is inner to
TrajectoryJTabbedPane.
public class Trajectory<ValueType>
{
public class TrajectoryJTabbedPane
{
public void setInitializaionJPanel( final InitializationJPanel
ijp )
{
this.ijp = ijp;
}
public class InitializationJPanel{}
}
}
My ParkTrajectory class extends the Trajectory class and worked well
prior to my attempts at making Trajectory generic.
public class ParkTrajectory extends Trajectory<double[]>
{
public class ParkOrbitJTabbedPane extends TrajectoryJTabbedPane
{
protected ParkOrbitJTabbedPane()
{
setInitializationJPanel( new
ParkOrbitVehicleConfigurationJPanel() ); // <-----
}
private final ParkOrbitVehicleConfigurationJPanel extends
InitializationJPanel{}
}
}
Now, the call to setInitializationJPanel within the
ParkOrbitJTabbedPane constructor results in the following error:
setInitializationJPanel(Trajectory<double[]>.InitializationJPanel) in
Trajectory<double[]>.TrajectoryJTabbedPane cannot be applied to
(ParkTrajectory.PparkOrbitJTabbedPane.ParkOrbitVehicleConfigurationJPanel)
Why is this so? The inheritance from InitializationJPanel has not
changed (at least directly). How do I get the method to work with the
generic model?
Any help is appreciated,
Todd