input
stringlengths
10
828
output
stringlengths
5
107
public string get property type string name return types get name
return a type of a property from its qualified name
public void add property description string name string description prop descs add new property description name description
add a description for the named property
public integer get integer property value string qualified name abstract field prop get abstract property qualified name if prop null if prop instanceof integer type return integer type prop get value else throw new illegal argument exception property asked is not an integer property return null
get the value of the property as an integer
public void to xml output stream os xstream to xml prop descs os
save as xml data all information defined before to the output stream
public string get property type string name string result prop def get property type name if result null for prop mapping mapping imported property mapping result mapping get property type name if result null break return result
get type declared for the name property given
public void import nsmapping nsmapping imp throws xmp schema exception merge nsmap imp ns maps merge complex basic types declaration entire xmplevel imp complex basic types declaration entire xmplevel merge complex basic types declaration schema level imp complex basic types declaration schema level merge complex basic types declaration property level imp complex basic types declaration property level
import an nsmapping content
public void set integer property integer type prop set specified simple type property prop
add an integer property
private boolean is basic type string type return basic types contains type
see if a specific type is known as a basic xmp type
public boolean is contained namespace string namespace return ns maps contains key namespace
say if a specific namespace is known
public string get specified property type string namespace qname prop if ns maps contains key namespace return ns maps get namespace get property type prop get local part check if its a complexbasic value type and if it s has been declared return get complex basic value type effective type prop get prefix
give type of specified property in specified schema given by its
public void set integer property value string qualified name integer int value set specified simple type property integer type class qualified name int value
set the value of the property as an integer
public xmpschema get associated schema object xmpmetadata metadata string namespace string prefix throws xmp schema exception if ns maps contains key namespace return null xmpschema factory factory ns maps get namespace return factory create xmpschema metadata prefix
return the specialized schema class representation if its known create
private void remove array value string qualified array name string field value complex property array complex property get abstract property qualified array name if array null array list abstract field to delete new array list abstract field iterator abstract field it array get container get all properties iterator abstract simple property tmp while it has next tmp abstract simple property it next if tmp get string value equals field value to delete add tmp iterator abstract field erase properties to delete iterator while erase properties has next array get container remove property erase properties next
generic array property removing
public boolean is complex basic types string namespace return complex basic types contains key namespace
check if a namespace used reference a complex basic types like
public void remove bag value string qualified bag name string bag value remove array value qualified bag name bag value
remove all matching entries with the given value from the bag
public void reset complex basic types declaration in property level complex basic types declaration property level clear
reset complex basic types declaration for property level
public void reset complex basic types declaration in schema level complex basic types declaration schema level clear
reset complex basic types declaration for schema level
public void add bag value as simple string simple name string bag value this add bag value local prefix sep simple name bag value
add a bag value property on the schema using the current prefix
public void reset complex basic types declaration in entire xmplevel complex basic types declaration entire xmplevel clear
reset complex basic types declaration for entire xmp level
public void add bag value string qualified bag name string bag value string splitted qualified name qualified bag name split complex property bag complex property get abstract property qualified bag name text type li new text type metadata rdf li bag value if bag null bag get container add property li else complex property new bag new complex property metadata splitted qualified name 0 splitted qualified name 1 complex property unordered array new bag get container add property li content add property new bag
add an entry to a bag property
public void remove sequence value string qualified seq name string seq value remove array value qualified seq name seq value
remove all matching values from a sequence property
public void add sequence value string qualified seq name string seq value string splitted qualified name qualified seq name split complex property seq complex property get abstract property qualified seq name text type li new text type metadata rdf li seq value if seq null seq get container add property li else complex property new seq new complex property metadata splitted qualified name 0 splitted qualified name 1 complex property ordered array new seq get container add property li content add property new seq
add a new value to a sequence property
public void add bag value string qualified seq name abstract field seq value string splitted qualified name qualified seq name split complex property bag complex property get abstract property qualified seq name if bag null bag get container add property seq value else complex property new bag new complex property metadata splitted qualified name 0 splitted qualified name 1 complex property unordered array new bag get container add property seq value content add property new bag
add a new value to a bag property
public void add sequence value as simple string simple name string seq value this add sequence value local prefix sep simple name seq value
add a new value to a sequence property using the current prefix
public void add sequence value string qualified seq name abstract field seq value string splitted qualified name qualified seq name split complex property seq complex property get abstract property qualified seq name if seq null seq get container add property seq value else complex property new seq new complex property metadata splitted qualified name 0 splitted qualified name 1 complex property ordered array new seq get container add property seq value content add property new seq
add a new value to a sequence property
public void remove sequence date value string qualified seq name calendar date complex property seq complex property get abstract property qualified seq name if seq null array list abstract field to delete new array list abstract field iterator abstract field it seq get container get all properties iterator abstract field tmp while it has next tmp it next if tmp instanceof date type if date type tmp get value equals date to delete add tmp iterator abstract field erase properties to delete iterator while erase properties has next seq get container remove property erase properties next
remove a date sequence value from the list
public void add sequence date value as simple string simple name calendar date add sequence date value local prefix sep simple name date
add a date sequence value to the list using the current prefix
public void add sequence date value string qualified seq name calendar date add sequence value qualified seq name new date type metadata rdf li date
add a date sequence value to the list
public complex property container get content return content
get property container of this schema
public void set attribute attribute attr content set attribute attr
set a new attribute for this schema
protected abstract field get property as simple string simple name return get property local prefix sep simple name
get a property with its name using the current prefix
protected abstract field get property string qualified name iterator abstract field it get all properties iterator abstract field tmp while it has next tmp it next if tmp get qualified name equals qualified name return tmp return null
get a property with its qualified name with its prefix
public string get local prefix return this local prefix
return local prefix
public string get registry return registry
returns the registry value
public void set registry string registry this registry registry
sets the registry value
public string get ordering return ordering
returns the ordering value
public int get supplement return supplement
returns the supplement value
public void set supplement int supplement this supplement supplement
sets the supplement value
public void set font dict list map string object font dict this font dictionaries font dict
sets the font dictionaries
public void set priv dict list map string object priv dict this private dictionaries priv dict
sets the private dictionary
public cidkeyed fdselect get fd select return fd select
returns the fd select value
public string get local prefix with separator return this local prefix sep
return local prefix with separator
public void set fd select cidkeyed fdselect fd select this fd select fd select
sets the fd select value
public void set global subr index index data global subr index this global subr index global subr index
sets the global subroutine index data
public index data get global subr index return global subr index
returns the global subroutine index data
public index data get local subr index return local subr index
returns the local subroutine index data
public void set local subr index index data local subr index this local subr index local subr index
sets the local subroutine index data
public int get glyph id int character code if this character code to glyph id contains key character code return this character code to glyph id get character code else return 0
returns the glyph id linked with the given character code
public string lookup cid int cid if cid2char mappings contains key cid return cid2char mappings get cid else for cidrange range cid ranges int ch range unmap cid if ch 1 return character to string char ch return null
this will perform a lookup into the cid map
public int lookup cid byte code int offset int length if is in code space ranges code offset length int code as int get code from array code offset length if char2 cidmappings contains key code as int return char2 cidmappings get code as int else for cidrange range cid ranges int ch range map char code as int if ch 1 return ch return 1 return 1
this will perform a lookup into the cid map
public void add cidrange char from char to int cid cid ranges add 0 new cidrange from to cid
this will add a cid range
public int map char ch if from ch ch to return cid ch from else return 1
maps the given unicode character to the corresponding cid in this range
public int unmap int code if cid code code cid to from return from code cid else return 1
maps the given cid to the corresponding unicode character in this range
protected void new control flow edge final abstract insn node insn final abstract insn node successor
creates a control flow graph edge
override protected void startup show new conversor unidades view this
at startup create and show the main frame of the application
public vkey get key int key code return vkey v keys get new integer key code
returns key of specified code
public vkey get key string name for object o v keys values vkey key vkey o if key to string equals ignore case name return key return null
returns key by its name
public void re add gpcontainer jpanel g pcontainer center tabs pane ctp center tabs pane g pcontainer get parent if ctp null int index ctp get tab index g pcontainer if index 1 ctp remove g pcontainer ctp add g pcontainer index
removes and adds graphic panel container into center tabs pane so that
public frame get root frame collection center tabs pane tab scene tabs col get scene graphic panels sync synchronized scene tabs col for center tabs pane tab scene tab iter scene tabs col cpscene scene tab cpscene scene tab iter if root frame null find root frame component parent component scene tab get graphic panel while parent instanceof frame parent parent get parent root frame frame parent find root frame false main frame null return root frame return null return root frame
finds root frame of gui hierarchy
public void postinit init mc new mouse center ac new actions center
initializes all objects that needs control center reference at the time of their
public void play string scene name if scene name null equals scene name scenes contains key scene name stop scene name animators remove scene name animator anim new animator scene name synchronized anim animators put scene name anim anim start
begins to animate specified scene
public void stop string scene name if scene name null equals scene name scenes contains key scene name animator anim animators get scene name if anim null synchronized anim anim stop simulation
stops simulation animation of specified scene
public void pause all paused scenes clear collection scene scene col collections synchronized collection scenes values synchronized scene col for scene s scene col if is scene animated s get name stop s get name paused scenes add s
stops all scenes and stores information about which were running so that
public void unpause all boolean force restart for scene s paused scenes if force restart is scene animated s get name play s get name paused scenes clear
unpauses previously paused scenes
public boolean is scene animated string scene name map string animator anim col collections synchronized map animators synchronized anim col animator anim anim col get scene name if anim null return anim is alive return false
states if specified scene is currently animated
static public scene get scene owning script my script script collection scene scenes col collection collections synchronized collection cc scenes values synchronized scenes col for scene scene scenes col if scene sc get script index script 1 return scene return null
searches for scene object whose scripts enter owns specified script
static public void clear all scenes cache collection scene scenes col collection collections synchronized collection cc scenes values synchronized scenes col for scene scene scenes col scene clear cache
clears all scenes cache
public void set scene scene scene scene tree model model scene tree model scene tree get model model set scene scene model fire whole tree changed get scene tree set scene scene
makes specified scene as active inspected in scene tree
public void set cell component int index jcomponent comp boolean repair sizes get rid of current component if there is one cells get index remove all add new component cells get index add comp border layout center cells get index update ui if repair sizes repair sizes
adds components into specified cell of multi split pane
public void insert jcomponent comp boolean resizable int index int size limit index value to valid range if index 0 index 0 else if index cells size index cells size copy table of sizes into new bigger table sizes my gui helper insert value at size sizes index add new cell multi split pane cell new cell new multi split pane cell resizable cells add index new cell add new cell fill cell with user component set cell component index comp true repair sizes reset cells bounds update ui
inserts component into new created cell at specified location
protected void update sizes if this graphics null sizes new int tabs size for int i 0 i tabs size i sizes i calc tab width i this graphics
calculates tabs hearders sizes according to their name
public void remove cell with comp jcomponent comp for int i 0 i cells size i if cells get i contains component comp remove cell i
removes cell which has child that is specified comp
protected int get sum size of nelems int n int sum 0 for int i 0 i n i sum sizes i return sum
calculates sum size of first n cells
private int get resizable cells count int count 0 for multi split pane cell c cells if c is resizable count return count
calculates number of resizable cells in this msp
public void set cell size int index int size sizes index size
sets size of specified cell
private int get div index int pos int index 1 for int i 0 i cells size 1 i int limit1 space i get sum size of nelems i 1 limit2 space i 1 get sum size of nelems i 1 if pos limit1 pos limit2 index i break return index
returns index of divider at location value
private void try to resize int n int value int new size prev last size prev value shift left up new size next last size next value shift right down if new size prev min cell size new size next min cell size new size prev new size prev min cell size else if new size next min cell size new size prev min cell size new size next new size next min cell size sizes n new size prev sizes n 1 new size next
tries to resize panels connecting with nth divider by value
private void enclose vert cell in hmsp component comp to drop int to index jcomponent cell comp null if get component count 0 cell comp jcomponent get component 0 remove cell comp multi split pane new sp new multi split pane 1 true add new sp new sp set cell component 0 cell comp true tabs pane new tp my gui helper get new tabs pane for tab comp to drop new tp add comp to drop new sp insert new tp false to index 100 new sp get cell to index set size to index 100
encolse cell of vertical mulstisplit pane in new created horizontal split pane
public my gui dn ddrawable get future layout drawable point p rectangle rects get active dn dareas for int i 1 i rects length i if rects i contains p if i 1 i 3 return new future layout drawable rects i else return new future layout drawable new rectangle int rects i get x 0 int rects i get width int get height return new future layout drawable get active dn dareas 0
creates object that will be drawn on glass pane and show future
public my gui dn dready register dn dready my gui dn dready dnd ready if dnds contains dnd ready adds dnd ready to manager list dnds add dnd ready adds mouse stuff to dnd ready dnd ready register gui manager this return dnd ready return null
registers new tabs pane as an object of interest and management for
public my gui dn dready get dn dready at accepting point scr p object o if dnds is empty return null my gui dn dready found null for my gui dn dready dnd ready dnds if jcomponent dnd ready is showing point local point my gui helper to local system dnd ready scr p if dnd ready accepts o dnd ready is valid drop location local point my gui helper compare comps by zindex component dnd ready component found 0 found dnd ready return found
finds out what if any dn dready componet is located at position
public boolean is empty return tabs is empty
states if this tabs pane has tabs or not
public boolean contains component comp return tabs contains comp
states if this tabs pane contains specified component
public boolean is stay alive when empty return stay alive when empty
states if this tabs pane should be removed form its parent when
public int get tab index component comp return tabs index of comp
returns index of specified tab component
protected void fill background graphics g component parent get parent color bg color parent null color white parent get background g fill rect 0 0 get width get height
fills background with parents color
public int get tab index at point p if is empty return 1 int dx get width tabs size return int math floor double p get x double dx
calculates which tab header is pointed by point p
public void set kd double kd this kd kd
sets damping factor of rotary spring
public void set ks double ks this ks ks
sets the spring constant from hooks law f ks x
public void set start angle double start angle this start angle start angle
sets angle of equilibrium of rotary spring
public double get angle return get a get angle x get b get angle x
calculates actual angle between a nd b vectors of rotary spring
public void build base shape array list mass m list m i physics helper get moment of interia m list position become physics helper get mass center of masses m list for mass m m list vec2d v new vec2d m get position get subbed position base vec list add v dyn vec list add new mass m this mass m get mass
builds rigid body from given mass list
public void build base shape array list vec2d v list double mass m i physics helper get moment of interia v list mass mass v list size position become physics helper get geom center of vecs v list for vec2d v v list vec2d r new vec2d v get subbed position base vec list add r dyn vec list add new mass v get x v get y mass this mass mass
builds rigid body from given list of points vectors and mass
public void apply force vec2d f vec2d pos vec2d r pos get subbed physics helper get mass center of masses dyn vec list double dist r get magnitude if dist 0 001 vec2d norm r get normalized vec2d perp norm get perp double rot f perp dot f torque dist rot f force add f
applies force to the rigid body in specified point
public void simulate double dt linear vec2d a force get scaled 1 mass vec2d dv a get scaled dt velocity add dv vec2d dr velocity get scaled dt position add dr position add separation v rotary double e torque m i double dw e dt omega dw double dang omega dt angle dang update dynamic shape dt
integrates rigid body movement equations
public void set position and angle vec2d p double a for int i 0 i base vec list size i vec2d v base vec list get i get rotated a get added p dyn vec list get i get position become v
sets rigid body dynamic shape according to given position and angle
public vec2d scene to base vec2d v v sub position v rotate angle return v
transforms vector from scene system to local base rigid body system
public vec2d base to scene vec2d v v rotate angle v add position return v
transforms vector from local base rigid body system to scene system
public void update mass data mass m m get velocity become vec2d zero vec2d v m get velocity v become m get position v make perp v scale omega v add velocity
updates mass properties as if it was part of this rigid body
public double get area throws runtime exception if valid double area 0 for int i 0 i count 1 i area masses i get position x masses i 1 get position y masses i 1 get position x masses i get position y return area 5 else throw new runtime exception cannot calculate area of non valid polygon
calculates area of this polygon