Well, that's the trouble with science fiction. You see, it's fictional. You can imagine all sorts of devices but they are not an actual technology because they wouldn't actually work.
I am not a lawyer, but from the technical standpoint there would be two components to such a device; First, the engineering and scientific effort you require to actually implement and test it; And Second proper user interaction studies to make it usable. Neither of these points are fulfilled in your example. The Star Trek pads magically always do exactly what their users intended them to do (or rather what the plot intends them to do) so there is no innovative aspect regarding the usability of the interface (Second point). For the First point, you have even less specifics.
The only thing you see is that (a) ubiquitous computing seems to be useful and (b) wireless connections seem to be useful (although they are not executed thoroughly since you see people carrying pads around when they want to get information to a different location on the ship). You are however given no insight into how these technologies actually work. And the bits that you are given, like the LCARS interface, are horrible from a user-interface design point of view.
So, regardless of personal views regarding patents or Apple in particular, the effort invested in creating that technology is not at all trivial and the fact that a science fiction show featured devices that very roughly approximate an actual product has nothing to do with how that product really works.
Since the dominating part of society has decided that innovation should be patent-able, patenting the realisation of innovation that makes fictional devices work in reality is legitimate. Whether or not society's decision is correct is a different (subjective) question.