@Test public void testGetWithStringFlavorReturnsName() throws Exception { assertEquals(animationObject.getName(), classToBeTested.getTransferData(getStringFlavor())); }
@Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (isStringFlavor(flavor)) { return animationObject.getName(); } if (isAnimationObjectFlavor(flavor)) { return animationObject; } return null; }
AnimationObjectTransferable implements Transferable { @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (isStringFlavor(flavor)) { return animationObject.getName(); } if (isAnimationObjectFlavor(flavor)) { return animationObject; } return null; } }
AnimationObjectTransferable implements Transferable { @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (isStringFlavor(flavor)) { return animationObject.getName(); } if (isAnimationObjectFlavor(flavor)) { return animationObject; } return null; } AnimationObjectTransferable(AnimationObject animationObject); }
AnimationObjectTransferable implements Transferable { @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (isStringFlavor(flavor)) { return animationObject.getName(); } if (isAnimationObjectFlavor(flavor)) { return animationObject; } return null; } AnimationObjectTransferable(AnimationObject animationObject); @Override DataFlavor[] getTransferDataFlavors(); @Override boolean isDataFlavorSupported(DataFlavor flavor); @Override Object getTransferData(DataFlavor flavor); }
AnimationObjectTransferable implements Transferable { @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (isStringFlavor(flavor)) { return animationObject.getName(); } if (isAnimationObjectFlavor(flavor)) { return animationObject; } return null; } AnimationObjectTransferable(AnimationObject animationObject); @Override DataFlavor[] getTransferDataFlavors(); @Override boolean isDataFlavorSupported(DataFlavor flavor); @Override Object getTransferData(DataFlavor flavor);  }