equal
deleted
inserted
replaced
149 return (context == contentsContext) ? contents : null; |
149 return (context == contentsContext) ? contents : null; |
150 } |
150 } |
151 |
151 |
152 |
152 |
153 /** |
153 /** |
154 * @see java.awt.Clipboard#getAvailableDataFlavors |
154 * @see java.awt.datatransfer.Clipboard#getAvailableDataFlavors |
155 * @since 1.5 |
155 * @since 1.5 |
156 */ |
156 */ |
157 public DataFlavor[] getAvailableDataFlavors() { |
157 public DataFlavor[] getAvailableDataFlavors() { |
158 Transferable cntnts = getContextContents(); |
158 Transferable cntnts = getContextContents(); |
159 if (cntnts != null) { |
159 if (cntnts != null) { |
165 return DataTransferer.getInstance(). |
165 return DataTransferer.getInstance(). |
166 getFlavorsForFormatsAsArray(formats, getDefaultFlavorTable()); |
166 getFlavorsForFormatsAsArray(formats, getDefaultFlavorTable()); |
167 } |
167 } |
168 |
168 |
169 /** |
169 /** |
170 * @see java.awt.Clipboard#isDataFlavorAvailable |
170 * @see java.awt.datatransfer.Clipboard#isDataFlavorAvailable |
171 * @since 1.5 |
171 * @since 1.5 |
172 */ |
172 */ |
173 public boolean isDataFlavorAvailable(DataFlavor flavor) { |
173 public boolean isDataFlavorAvailable(DataFlavor flavor) { |
174 if (flavor == null) { |
174 if (flavor == null) { |
175 throw new NullPointerException("flavor"); |
175 throw new NullPointerException("flavor"); |
184 |
184 |
185 return formatArrayAsDataFlavorSet(formats).contains(flavor); |
185 return formatArrayAsDataFlavorSet(formats).contains(flavor); |
186 } |
186 } |
187 |
187 |
188 /** |
188 /** |
189 * @see java.awt.Clipboard#getData |
189 * @see java.awt.datatransfer.Clipboard#getData |
190 * @since 1.5 |
190 * @since 1.5 |
191 */ |
191 */ |
192 public Object getData(DataFlavor flavor) |
192 public Object getData(DataFlavor flavor) |
193 throws UnsupportedFlavorException, IOException { |
193 throws UnsupportedFlavorException, IOException { |
194 if (flavor == null) { |
194 if (flavor == null) { |