eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DropObject':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DropObject


Inheritance:

   Object
   |
   +--DropObject
      |
      +--DropObject::Class
      |
      +--DropObject::Color
      |
      +--DropObject::File
      |
      +--DropObject::Image
      |
      +--DropObject::Method
      |
      +--DropObject::Project
      |
      +--DropObject::Text

Package:
stx:libview2
Category:
Interface-DragAndDrop
Version:
rev: 1.24 date: 2015/02/04 23:15:25
user: cg
file: DropObject.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Claus Atzkern

Description:


instances of myself and subclasses wrap objects which are being
dragged (and dropped).
Any object can be dragged, but for some often encountered types,
specialized subclasses are provided, which react to certain queries.


Related information:

    DragAndDropManager

Class protocol:

defaults
o  displayObject
return some object which is shown while dragging;
here an image based upon my displayObjectName is returned.
Either this method or #displayObjectName is usually redefined
in subclasses

o  displayObject: aDisplayObject
set the object which is shown while dragging;
this object must understand #displayOn:x:y: (i.e. the displayObject
protocol). The object is kept per class for ALL future drag operations.
Useful to change the default images in subclasses.

o  displayObjectName
return the name of a bitmap image file, which is used
during a drag.
Here, a dummy file is returned.

instance creation
o  dropObjectClassFor: someThing
given something to drag&drop, return an appropriate
dropObject class for it.

o  new: someThing
create an instance on something

o  newClass: aClass
create an instance for a class (dragging a class from a browser)

o  newColor: aColor
create an instance for a color (dragging a color from a bitmap editor)

o  newFile: aFilename
create an instance for a file or directory (dragging a file in a fileBrowser)

o  newFileInArchive: aFilename
create an instance for a file or directory contained inside an archive
(dragging a file from an archive shown in a fileBrowser)

o  newImage: anImageOrForm
create an instance for an image

o  newInstanceOf: aClass for: someThing
create an instance on something

o  newMethod: aMethod
create an instance for a method (dragging a method in a browser)

o  newProject: aPackageSymbol
create an instance for a package (dragging a package from a browser)

o  newText: aTextOrString
create an instance for some text (dragging some text from an editor)


Instance protocol:

accessing
o  displayObject
return my graphical representation - here a default is returned

o  displayObject: anObject
set my graphical representation

o  theObject
return the real object represented by the receiver

o  theObject: something
set the real object represented by the receiver

testing
o  isClassObject
return true, if the dropObject represents some class

o  isColorObject
return true, if the dropObject represents a color

o  isFileInArchive

o  isFileObject
return true, if the dropObject represents some file or directory

o  isImageObject
return true, if the dropObject represents some image

o  isMethodObject
return true, if the dropObject represents some method

o  isProjectObject
return true, if the dropObject represents some project

o  isTextObject
return true, if the dropObject represents some text


Private classes:

    Class
    Color
    File
    FileInArchive
    Image
    Method
    Project
    Text


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sun, 22 Jul 2018 06:48:14 GMT